OpenFire-使用PubSub的永久群聊 [英] OpenFire - Permanent Group Chat using PubSub

查看:146
本文介绍了OpenFire-使用PubSub的永久群聊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先从这个问题开始: Asmack/openfire我如何保持用户永久位于群组聊天室

First from this question : Asmack/openfire How do I keep a user permanently in groupchat room

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

I read that I cannot use MUC to keep the user persistent in the group, they'll automatically leave the group and can rejoin after they come online again, that concept is like IRC like what've been asked in here -> http://community.igniterealtime.org/thread/48020.

然后从我读到的有关使用pubsub的stackoverflow问题开始,然后我对pubsub进行了一些研究,我得到的是pubsub可以将用户保留在组中,即使用户处于脱机状态,但消息流是更像是从发布者到订阅者的定向(只读).

Then from the stackoverflow question I read about using pubsub, then I've done some research about pubsub and what I've got is pubsub can persist the user to be in the group even the user is offline but the message flow is more like one directional from the publisher to the subscriber (read-only).

因此,如果要创建群聊应用程序,可以使用pubsub并将所有成员设置为发布者和订阅者吗?还是有其他替代解决方案?或者我对pubsub和MUC的理解不正确? 我的目标是创建一些类似于WhatsApp或Blackberry Messenger群组的聊天.

So if I want to create a group chat application can I use pubsub and set all the member to become both publisher and subscriber? or is there any alternative solution?or my understanding of the pubsub and MUC is incorrect? my goal is to create some group chat like in the whatsapp or blackberry messenger group.

谢谢.

推荐答案

您可以通过更改以下openfire代码,使用户在MUC中的群聊中永久存在.

You can make users permanent in Group chat in MUC by changing the following code of openfire.

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);

这篇关于OpenFire-使用PubSub的永久群聊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆