Created
September 3, 2018 19:18
-
-
Save cblgh/418c7ea38391ec58a3329c3d75d7b42c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isValidMessage(msg) { | |
if (!msg.value.type) msg.value.type = "text/chat" | |
return msg.value && typeof msg.value === "object" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment