You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 30, 2018. It is now read-only.
What I'm trying to achieve is to receive a message sent by a user in another window, however the response is printed multiple times.
Its seems to me like the 'DemoServerAdapter.prototype.sendMessage' function is called x times as messages already sent.
socket.on('chat_receive', function(message) {
console.log(message);
var echoMessage = new ChatMessageInfo();
echoMessage.UserFromId = message.send_user_id; // It will be from Echobot
echoMessage.RoomId = roomId;
echoMessage.ConversationId = conversationId;
echoMessage.Message = "The other: " + message.message;
// if it's not a private message, the echo message will be to the current user
if (!roomId && !conversationId)
echoMessage.UserToId = current_user_id; // Id del usuario actual
// this will send a message to the user 1 (you) as if it was from user 2 (Echobot)
_this.clientAdapter.triggerMessagesChanged(echoMessage);
});
Example:
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What I'm trying to achieve is to receive a message sent by a user in another window, however the response is printed multiple times.
Its seems to me like the 'DemoServerAdapter.prototype.sendMessage' function is called x times as messages already sent.
Example:
The text was updated successfully, but these errors were encountered: