powered by Jive Software

In group chat occupants is removed from group when he is offline

  • groups can persist user no matter if they are online or not.
  • deliver offline messages to a group member(when he comes online).

Do i need to customize the server side or the client side? Any idea how WhatsApp like group chat can be done with asmack and Openfire will be highly appreciated.

Not sure i understood the question. Also haven’t used WhatsApp. Contact Group and a Group Chat (or MUC - Multi User Conversation) are two completely different parts of XMPP. Group Chat only handles online users, because you have to be connected to a room, to be able to participate, receive/send messages, etc. If you are not connected or offline, you are not existing for this room and can’t receive anything.

Anything is possible and there is probably a way to change Openfire to show e.g. offline users who are members of that room. Though Group Chat doesn’t have offline message funcionality. So if offline user connects to a room, he will only be able to see a history of the chat, if history is set to be saved.

MUC sends messages only to online users. The only ‘persistance’ is the chat history.

Openfire supports also ‘server side groups’ or you can create client-side groups in the roster.A broadcast by the client to all group membes should work fine.

There’s also the broadcast plugin …

The more important question:

Who should be able to manage the ‘chat group’? Can one search for it? Who can invite/kick others? How long does it live?

Who should be able to manage the ‘chat group’?

Hello LG.

If you are using whatsapp then you understand very well.

When i create group . Group is persistant in database and i am administrator of a group. I will be able to add occupants in this group and also all group members are notified about any changes in group. When admin leaves group that time randomly one group member is select for group administrator.

Who can invite/kick others?

Only administator are able to invite and kick participants. And also occupants able to leave a group.

How long does it live?

Group is persisted till last member of group (admin) is exit group.

When i create group . Group is persistant in database and i am administrator of a group. I will be able to add occupants in this group and also all group members are notified about any changes in group. When admin leaves group that time randomly one group member is select for group administrator.

You could create a members-only MUC room, where you (the found of the group) is the owner and everybody else is a mere member.

Members are persisted and affiliated to the MUC room, so that they are still a member when they are offline.

About the notification: There are some issues with Openfire, that it does not send messages to (offline) members, when there are changes like new members, new administrator, etc… OF-808

When the owner leaves the group, it’s not possible unless there’s another owner. So you would nominate another member as owner prior to leaving.

But there’s another bug in this context: OF-809

I am using openfire 2.9.2.

I noticed one issue in muc. when any user send message in group, sender of message also get echo message of his sended message from server.

This is expected behavior. It’s specified by XMPP.

Hi CSH,

I was basically use an ejabberd installation until you mentioned —

You could create a members-only MUC room, where you (the found of the group) is the owner and everybody else is a mere member.

Members are persisted and affiliated to the MUC room, so that they are still a member when they are offline.

I installed open fire and configured to work with my app but it still works exactly as ejabberd; i.e. users are removed from the group if they go offline.

Can you please elaborate on this as this is something that is (critically) required by my app.

Thanks.

What CSH meant is that group members are still group members when they are offline, but that doesn’t mean they will stay in the room if they go offline. They will be removed from the participants list until they login and join the room again. That’s how jabber/xmpp works and every standard compliant server will work the same.

Well that’s not the case — it doesn’t show any group members as offline or online. Even when I login, the group shows 0/30 or 0/limit number of participants.

EDIT: I have just verified this using Adium itself. The user logs in but the group has already removed the user.

EDIT2: I understand what you are saying now. But that’s the whole problem with this behavior. And CSH meant that if the rooms were declared as member-only, that would kind of solve the problem. In this case, it’s the same problem that you still have to manually join the group again and deal with the history, etc. That means you have notifications from the server once you go offline as you practically don’t exist.

Is there a way around this? More concerned and wondering how Whatsapp is able to accomplish this? Is there a simple way to go around this or you just have to hack the server?

What I meant was, that if the room is members-only, you could display all the members in the “room roster”, even if all of them are in fact offline. Members are persistent and affiliated to the room.

I’ve done it like that:

First, request all members, then request all admins, then request all owners, then display all together in a room roster as offline.

Requesting works like that:





As soon as a presence is received from one of the members, switch him to online. This way you have online and offline users displayed in the same room roster.

Actually I’ve made every member as an owner, so that every member could modify the members list and invite new members. I am also not sure, if mere members are allowed to retrieve the members list.

You probably have to write your own client software, because most existing software (also like Adium) uses just the room occupants (instead of members) to display them in the room roster. Occupants are always online and disappear from the room when they go offline.