开发者

XMPP MUC problem

开发者 https://www.devze.com 2023-02-24 07:12 出处:网络
I am using XMPP with strope.js and openfire. I have a query that how to get all the members already present in the room???

I am using XMPP with strope.js and openfire. I have a query that how to get all the members already present in the room???

More Priece: When i refresh the page and send my pres开发者_开发技巧ence stanza to the room. I get my presence from the room and i show room joined. But how to get the presence stanza of whole those who are already in the room.

EDIT:

Let me explain you by case, Suppose A and B wants to group chat. First A enters the Room and he sees himself in the room. Then B enters the room, so A gets presence stanza of B and now on A side there are A and B in the room. But on B side it shows only B in the room.

Now A refreshes the page and B gets the presence stanza and now on B side both are in the room, but on A side now only A is in the room.


The presence is sent by Openfire to all occupants in the room, just add an event handler in strophe to the presence stanza. Also when a new member joins the room, her presence is broadcasted to all members already in the room by the room itself.

Also another way to get all users in the room is to query for roster of the room

Hope this helps

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号