How to get last conversed user using XMPP ios8?

49 views Asked by At

I am developing a chat application and I want the user's JID with whom the current user had a chat with for the last time or whose message was received for the last time.

Can anyone help me to find out the solution of this issue?

1

There are 1 answers

0
Obscure Geek On

As far as I have worked on XMPP there is no explicit mechanism to get that information. However you can implement in the following way:

  1. The server generally logs all the activities or like this plugin for Openfire find one for the server you are using which archives all the messages.
  2. Now you need to write a web-service which will simply access either of the options mentioned before and returns the desired result.
  3. Simply consume this web-service from your application.

I hope this helps. In case you find any XMPP based implementation do share it as an answer here.