Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

messages repeated in group chat #64

Open
navjeetc opened this issue Nov 3, 2015 · 3 comments
Open

messages repeated in group chat #64

navjeetc opened this issue Nov 3, 2015 · 3 comments

Comments

@navjeetc
Copy link

navjeetc commented Nov 3, 2015

I am writing a curl script that calls express/node.js url to send a message to a group chat room. All my logic to send message to group chat is in online callback.

xmpp.on('online', function() {
chat_room = req.body.chat_room + '@conference.chat.domain.com';
xmpp.join(chat_room+'/batman');
xmpp.send(chat_room, req.body.content, true);
});

When I call the curl script twice, I see three messages being posted (second call also posts the message from first call) to group chat room. Is there a clean way to close connection or leave chat room after sending each message to group chat room?

@ofleaf
Copy link

ofleaf commented Apr 20, 2016

I have same problem. how did you solved?

@silverbucket
Copy link
Member

I'm not actively developing the library at the moment, pull requests always welcome though!

@ofleaf
Copy link

ofleaf commented Apr 20, 2016

I'm solved :)
I didn't input nickname to xmpp.join command.

xmpp.join(room + host + '/nickname');

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants