Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
TalkJS example for `session.on("message", ..)`
// ... initialize talkSession as per
talkSession.on("message", function(message) {
// only process messages that the current writes, not the ones
// the current user receives
if(!message.isByMe) {
// perform actions based on message body
if(message.body === "what is your email?") {
// send AJAX to backend to trigger an action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment