Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to retrieve conversation history of users #55

Open
onurhazar opened this issue Mar 14, 2017 · 3 comments
Open

How to retrieve conversation history of users #55

onurhazar opened this issue Mar 14, 2017 · 3 comments

Comments

@onurhazar
Copy link

Hi,
I am trying to get list of archived messages between users from openfire. Client connection is successfully made and retrieving messages instantly but when I have two devices(same account) sending messages to someone in the same conversation, other second device didn't get what I sent previously so it looks like my sent messages are disappeared. I already implemented caching messages to device's database but it also needs to be updated. I saw there is a method called GetGroupChatLog but I am not sure if this fits or Sharp.Xmpp supports. Any idea would be greatly appreciated. Thanks!

@Mofl2328
Copy link

I had the same problem with an eJabberd Server and I was able to receive an defined amount of history when entering a multi user chat but otherwise there isn't any option in Sharp.Xmpp to get any history.

But if you take a look at MaM (XEP-313) you have a protocol for requesting history for everything that is easy to use and not too much work to implement in Sharp.Xmpp based on the CustomIQExtension class.

@Mofl2328
Copy link

Mofl2328 commented Jun 8, 2017

My fork with the additional extension for xep-0313

I got around to upload my MaM Extension here too. It is pretty minimal (I only need before and after as option) and has no security checks on whether the server and the chat runs the archive node before calling it. Sadly calling the disco on the server is not enough to check for xep-313 support.

Work pretty good for me. One issue I noticed was just that you can't rely on the order of the messages you receive after calling the archive when you ask for higher number of old messages and have to compare the timestamps.

@maciey
Copy link

maciey commented Feb 26, 2019

Hi Mofl2328,

Can you please advise what method I should call to get archived messages ?
( I see your changes, but still not sure what to call / how to receive history)

Apologs if naive question but Im quite new to the topic...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants