gpt4 book ai didi

xmpp - OpenFire - 使用 PubSub 的永久群聊

转载 作者:行者123 更新时间:2023-12-04 20:44:47 30 4
gpt4 key购买 nike

首先从这个问题:
Asmack/openfire How do I keep a user permanently in groupchat room

我读到我不能使用 MUC 来保持用户在组中的持久性,他们会自动离开组并在他们再次上线后重新加入,这个概念就像 IRC 就像这里问的一样 -> http://community.igniterealtime.org/thread/48020 .

然后从我读到的关于使用 pubsub 的 stackoverflow 问题,然后我对 pubsub 做了一些研究,我得到的是即使用户离线,pubsub 也可以将用户保留在组中,但消息流更像是一个从发布者到订阅者的方向(只读)。

那么如果我想创建一个群聊应用程序,我可以使用pubsub并将所有成员设置为发布者和订阅者吗?或者是否有其他解决方案?或者我对 pubsub 和 MUC 的理解不正确?
我的目标是创建一些群聊,就像在 whatsapp 或黑莓 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);

关于xmpp - OpenFire - 使用 PubSub 的永久群聊,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19782876/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com