From f7eeab16d7521af11c381da335d029ee860d30e0 Mon Sep 17 00:00:00 2001 From: Ondrej Prazak Date: Tue, 22 Dec 2020 11:55:06 +0100 Subject: [PATCH] Replace "shout" event with "message:created" --- components/ChatWindow.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/ChatWindow.tsx b/components/ChatWindow.tsx index acf6050..a3f1b33 100644 --- a/components/ChatWindow.tsx +++ b/components/ChatWindow.tsx @@ -516,8 +516,7 @@ class ChatWindow extends React.Component { customer_id: customerId, }); - // TODO: deprecate 'shout' event in favor of 'message:created' - this.channel.on('shout', (message: any) => { + this.channel.on('message:created', (message: any) => { this.setState({isGameMode: false}, () => this.handleNewMessage(message)); }); @@ -656,8 +655,7 @@ class ChatWindow extends React.Component { return; } - // TODO: deprecate 'shout' event in favor of 'message:created' - this.channel.push('shout', { + this.channel.push('message:created', { body: message, customer_id: this.state.customerId, sent_at: sentAt,