Search code examples
ioserlangxmppframeworkmultiuserchatmongoose-im

MUCLight Offline message fetch XMPP


Have any one implemented MUC Light that is Beta released in MongooseIM Chat server for XMPP.

How to fetch fetch following messages when

1) User are offline while they were added as participants of group. 2) Users who are members byt offline and get messages on the muc light group.

I have achieved mod_zero push to trigger the offline message to Users, Also able to store the message in mam_muc_message table in my chat server MySQL database. But how the client will fetch these messages and also be notified with all messages.

Any guidance is much appreciated.

http://mongooseim.readthedocs.io/en/latest/open-extensions/muc_light/


Solution

  • Thanks for suggestion and comments here is how i managed with small limitation.

    1. When user is offline while he was added by some group by others, he wont get this create group stanza as muc-light suggest.
    2. When he come online , there have to be someone atleast who send a group message
    3. When he gets this message I fetch the group configuration and create a new group first and keep this message as pending to process.
    4. Once group created then i link this pending message to this group.
    5. Then I call the MUC light MAM messages as given in 6.2 XEP-0313 Message Archive Management
    6. Then I fetch all the previous messages and add in my database and display on the screen.

    The only limitation that is there is after he come online he can't go to server and ask ALL muc-light messages, some how coz the server is not available is thrown if I ask for traditional MAM process to give messages for muclight.****.com group ID so I use as they asked to fetch in above link.

    Hope MUC Light Beta is improving ahead more taking this into consideration.