Created
May 16, 2017 21:49
-
-
Save arqex/fbfe99a3f46a53beae9be7fe280343ad to your computer and use it in GitHub Desktop.
Message receive
This file contains hidden or 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
// In our socket event handlers file | |
socket.on('messageReceived', message => { | |
freezer.emit('message:received', message); | |
}); | |
// In our message reactions file | |
freezer.on('message:received', message => { | |
freezer.get().messages.push( message ); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment