MAM XEP-0313 - Query conversation list for a particular user

646 views Asked by At

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

1

There are 1 answers

4
michalwski On

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.