1

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/

Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
codelover
  • 1,113
  • 10
  • 28
  • If the messages are properly stored in mam_muc_message, then use the standard protocol described in [section 4. Querying an archive of Message Archive Management XEP](http://xmpp.org/extensions/xep-0313.html#query). – erszcz Nov 07 '16 at 16:55
  • you mean its nothing to do like http://xmpp.org/extensions/xep-0045.html#enter-history section 7.12.4 – codelover Nov 07 '16 at 16:58
  • can you please give snippet example. will muc light handle it ??? – codelover Nov 07 '16 at 16:58
  • It's nothing like XEP-0045. MUC Light doesn't support room history the way XEP-0045 describes it. Use Message Archive Management instead - the examples from there should work without issues. – erszcz Nov 07 '16 at 17:01
  • ok I know its to much to ask can you refer this and lemme guide that i am doing correctly. – codelover Nov 07 '16 at 17:02
  • http://mongooseim.readthedocs.io/en/latest/open-extensions/muc_light/ used this, then set muc_light backend to odbc where my messages started coming in muc_mam db table for regular chats. just dont know fetch , will try as you directed but. – codelover Nov 07 '16 at 17:03
  • refer in link 6.2 XEP-0313 Message Archive Management – codelover Nov 07 '16 at 17:03
  • 1
    Look at the mam_muc_message table and pick one of the users who have messages there. Connect as one of these users and sent the Example 1. snippet from the link to Message Archive Management I pasted in a comment above. You should receive (some of) the messages which you can see in the SQL database table. – erszcz Nov 07 '16 at 17:05
  • ok noted will try this and revert back. thanks for instant answer :) – codelover Nov 07 '16 at 17:06
  • I tried the example 1 as directed and if i send ` ` It gives me service not available although if I try sending the same as MUC Light docs Section 6.2 the messages are fetch so i use the logic as posted in the below self answered section. – codelover Nov 09 '16 at 08:50

1 Answers1

1

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.

codelover
  • 1,113
  • 10
  • 28
  • Is there any settings in ejabberd config file to delete muc archive messages from db to purge after certain period – codelover Nov 23 '16 at 06:34