Seeking help on how to obtain synchronized conversations. #692
-
I am seeking help because I don't know how to retrieve the conversation list. Using client.Store.Contacts.GetAllContacts() and client.GetJoinedGroups() only allows me to get the list of added contacts and groups, but I am unable to obtain conversations when I haven't added the contact and yet have a conversation with them. I'm not sure how to get the synchronized conversation list. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
As far as I know there is no interface like that. You have to create and hold conversations on your application side. You can reconstruct them while parsing all incoming messages (either coming from history sync or live). Keep in mind that newly created conversations from your application side have to be threated separately. |
Beta Was this translation helpful? Give feedback.
There is no difference if it is a contact or a non-contact.
The flow is like this:
The first time after you scan the QR code to login (or type in the login code), you will receive all past messages in the history sync events. You need to save them in your own database.
While you save them, it's good practice to save them in a message table and in a conversation table. For every first message of a distinct JID you create a new conversation.