3

I am developing a mobile messaging app (ios) and I support the logout feature. I want to keep the latest conversation list when the users logs in back again. Because the local storage of the app gets cleaned once logout.

I am using MAM XEP-0313 sucessfully but I have not found an IQ to query the conversation list of a particular user.

For example:
       chat
user_a -> user_b
          user_c
          user_d
          user_f

user_a has had conversations with 4 users and he wants to logout of the app, when he comes back in he needs to get those last 4 conversation threads on his list.

What I do when a user messages another user is that I add them to my roster and have the logic of automatic subscription. So I was thinking to use the roster history logic to query this collection but I was also expecting the MAM module to have a more direct way..

I am using MongooseIM server

user1000622
  • 519
  • 1
  • 7
  • 18

1 Answers1

1

I understand your problem, the solution you have is probably the best one you can have with standard XEPs and their implementations.

The conversation list is actually sth missing in MAM spec or in general in XMPP. There are some works to define an extension to get you all the conversations where you have some unread messages (so called "unread sync"). Will this be enough for you or you would rather want to get some kind of "inbox". By "inbox" I mean a list of all recent conversations with unread messages count where there are some unread messages.

michalwski
  • 359
  • 1
  • 3
  • Exactly, I need an inbox. I was thinking to use the roster version http://xmpp.org/extensions/xep-0237.html. And according to my logic the last roster items should be the ones which the user had conversation with. So knowing this list, start requestion archiving for each roster item (jid) accordingly but I do not think it can be all all reliable or consistent in the end. Any other thoughts ? – user1000622 Dec 20 '16 at 23:59
  • I have created an application in iOS and connected & fetched users from xmpp and able to get offline messages too.Now i need to fetch conversations of a particular user using XEP-0313, How to implement XEP-0313. – Mahesh Narla Jan 06 '17 at 11:11
  • @michalwski, any progress for this feature on MAM ? – user1000622 Nov 06 '17 at 15:47
  • 1
    @user1000622 Recently we released the "inbox" feature in MongooseIM. Please take a look at https://mongooseim.readthedocs.io/en/latest/modules/mod_inbox/ for more details. – michalwski Oct 04 '18 at 07:44