Skip to content

Instantly share code, notes, and snippets.

@nparsons08 nparsons08/listen.js Secret
Created Mar 19, 2020

Embed
What would you like to do?
channel.on('message.new', event => {
const message = channel.state.messages[channel.state.messages.length - 1];
if (message.user.id !== chatClient.user.id) {
this.props.showNotification({
title: 'Stream Notification',
message: `${message.user.name} says: ${message.text}`
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.