First from this question : Asmack/openfire How do I keep a user permanently in groupchat room
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.
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).
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.
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);