Nik*_*ono 5 chat xmpp openfire publish-subscribe multiuserchat
首先来自这个问题: Asmack/openfire如何将用户永久保留在群聊室中
我读到我不能使用MUC来保持用户在群组中的持久性,他们会自动离开群组并且在他们再次上线后可以重新加入,这个概念就像IRC一样,在这里被问到 - > http:/ /community.igniterealtime.org/thread/48020.
然后从stackoverflow问题我读到关于使用pubsub,然后我做了一些关于pubsub的研究,我得到的是pubsub可以坚持用户在组中,即使用户离线,但消息流更像是一个从发布者到订阅者的指示(只读).
因此,如果我想创建群聊应用程序,我可以使用pubsub并将所有成员设置为发布者和订阅者吗?或者是否有其他解决方案?或者我对pubsub和MUC的理解不正确?我的目标是在whatsapp或blackberry messenger组中创建一些群聊.
谢谢.
您可以通过更改 openfire 的以下代码使用户永久保留在 MUC 的群聊中。
File : src/java/org/jivesoftware/openfire/muc/spi/LocalMUCUser.java
change line 547-550:
// TODO Consider that different nodes can be creating and processing this presence at the same time (when
remote node went down)
removeRole(group);
role.getChatRoom().leaveRoom(role);
TO:
// TODO Consider that different nodes can be creating and processing this presence at the same time (when
remote node went down)
// TODO Dont remove user from group when they go offline.
//removeRole(group);
//role.getChatRoom().leaveRoom(role);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2306 次 |
| 最近记录: |