无需邀请即可加入XMPP MUC会议室-ejabberd

无需邀请即可加入XMPP MUC会议室-ejabberd

问题描述:

对于永久XMPP房间,如果客户断开了一次连接,使客户重新加入房间的方法是什么?在测试期间,我发现仅将存在节发回给所述会议室的JID并不会使客户端再次在会议室中可用.重新进入房间是否仅在用户收到邀请后才发生(因此,在我们的情况下,如果用户断开连接一次,则用户将需要另一个邀请才能加入房间?)?

For persistent XMPP rooms, what is the way to make a client join back the room again if he / she has disconnected once? During testing, I find that simply sending back the presence stanza to the said room's JID does not make the client be available in the room again. Does re-entering a room happen only when a user has received an invite (and thus, in our case, if the user disconnects once, the user would need another invite to join the room?)?

如果是这种情况,那么对于重新连接的原始会议室参与者,实现这种邀请的自动生成的最佳方法是什么?

If that is the case, then what is the best way to implement the auto-generation of such invites for original room participants who are reconnecting?

谢谢.

使用 pubsub 功能和相对的MultiUserChat 书签的最佳方法. 如果您有特殊需求无法满足的需求,则可以开发自定义书签管理器.

Best way it's to use pubsub feature and relative MultiUserChat bookmarks. You can develop a custom bookmarks manager if you need something declined on your special needs.

您需要执行以下步骤吗?

Do you need the following steps:

1)创建持久性群组聊天时,请在首次加入后在群组聊天中添加书签. (=>保存数据库组聊天名称和密码)

1) When create a persistent groupchat, bookmark the groupchat after first join. (=> save on db groupchat name and password)

2)接收邀请时,在第一次加入后在群组聊天中添加书签(=>保存数据库群组聊天的名称和密码)

2) When recive an invite, bookmark the groupchat after the first join (=> save on db groupchat name and password)

3)在登录/重新连接时检索书签列表

3) On login / reconnect retrive bookmarks list

4)Foreach书签->加入(并分配侦听器等)

4) Foreach bookmark -> join (and assign listeners and so on)

5)提供一个删除书签条件(基于时间戳,会话,显式请求等).

5) Provide a delete bookmark condition (based on timestamp, session, explicit request and so on).

官方规范