ejabberd icon indicating copy to clipboard operation
ejabberd copied to clipboard

Group chat based on mod_muc

Open shyaken opened this issue 11 years ago • 14 comments

I'm creating a mobile application for group chat, using mod_muc however I met some problem:

  1. When app close, user will go offline -> user left all group chat he joined. I can make he autojoin when he login, but muc not consider him as a member when he is offline, so no offline message can be sent to him when he is offline, I need offline message to push notification for him when he is not opening the app
  2. I need a kind of room that when somebody invite an user, that user will automatically be a member of that room without received any invitation (then must choose accept blah blah) therefore if he is not using the app, he still be a member of that group chat and can get notification when he is offline

I'm using mod_offline_post : https://github.com/adamvduke/mod_interact/tree/master/src for pushing notification and it work perfectly with one to one chat

shyaken avatar Jan 29 '15 09:01 shyaken

As defined by XMPP extension (XEP-0045), MUC is based on presence. We are discussing at the XSF improved MUC that would not rely on presence and would allow the use case you need, but it will take quite some time of "standard" effort before it is available.

I hope it makes sense.

mremond avatar Feb 20 '15 15:02 mremond

It's great to hear from you. Waiting for this awesome feature of muc.

shyaken avatar Feb 28 '15 02:02 shyaken

Hi! Do we have any updates on this? I'm also trying to implement these two use cases 1) able to start group chat without invitation (you can add anyone into a group within your contact list; 2) support offline group message. Are you aware of any extended module that can support these?

servletduan avatar Sep 03 '15 00:09 servletduan

  1. able to start group chat without invitation

You could just teach your client to auto-follow MUC invitations.

  1. support offline group message.

You could use MUC MAM for that.

weiss avatar Sep 03 '15 07:09 weiss

able to start group chat without invitation (you can add anyone into a group within your contact list

You can also may want to convert one-to-one chat into a groupchat: http://xmpp.org/extensions/xep-0045.html#continue Then you can just invite anyone using MUC invitations as @weiss suggested.

zinid avatar Sep 03 '15 08:09 zinid

Those suggestion is not really good UX.

  1. If the invitation come when user is offline? how can they accept it to receive message from that time? Others don't know you are in group until you are online.
  2. How user know there is a message when they are offline? And store message on server is killing it (with limit budget for server) it will grow very fast.

I'm now using multicast for group solution, which local app will have database to store group member, and sync with an api. I also develop a module to push message whenever there's an offline message, so that user won't miss a things.

shyaken avatar Oct 15 '15 07:10 shyaken

Just write your own group chat module. No other suitable way.

FlowerWrong avatar Oct 15 '15 08:10 FlowerWrong

Yeah :D, Trying to do that :D

shyaken avatar Oct 15 '15 08:10 shyaken

how can they accept it to receive message from that time?

My suggestion was to query the server-side storage.

Others don't know you are in group until you are online.

I would probably add invited users to the members list and let other clients read that list.

And store message on server is killing it (with limit budget for server) it will grow very fast.

You could store them for some limited amount of time. E.g., have Cron delete all messages older than 10 days or whatever.

Anyway, yes, if you don't want server-side storage, you'll have to implement your own thing.

weiss avatar Oct 15 '15 08:10 weiss

I am also facing the same issue. In group chat once user goes offline it also goes out from group. How can I kept him in group so that he will receive notification as well, spend lot of time to achieve this but didn't found any clue.

If someone already worked on it to achieve this functionality, Please help me to do this !!

piyush-singhal avatar Mar 20 '16 20:03 piyush-singhal

Hi guys!

I'm also in a very similar situation:

I'm developing a mobile app and I need to add the users to the muc groups without invitations. It is not a problem with the old messages (could be saved on the server), it is a problem with the UX because when a user accepts his invitation, it will only see those users that have already accepted the invitation, which is wrong/strange in contrast with the expected behaviour (Telegram, Whatsapp..) where, when the room is created, all the users appears as members of it.

Any way to do it?

I could implement a module if needed, but what I have to do/change?

@badlop @weiss @mremond

joanlopez avatar Oct 20 '16 10:10 joanlopez

when a user accepts his invitation, it will only see those users that have already accepted the invitation

My suggestion above was to use/display the members list. That's what Conversations does, for example.

By the way, note that MUC/Sub was published in the meantime, which might also be interesting for you.

weiss avatar Oct 20 '16 11:10 weiss

Many thanks @weiss, I will try with modifying the member list

joanlopez avatar Oct 20 '16 21:10 joanlopez

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jun 11 '19 09:06 lock[bot]