-1

I am using both Android and iOS official twilio conversations SDK. We need to fetch messages from a closed conversation. However, when calling getLastMessages, it returns an empty list for that specific conversations.

When calling the same method from an active conversation, it works properly. I searched on twilio docs to see if there is some rule about this, but none was found.

Is that a bug or a feature? We have access to messages on closed conversations via twilio Android/iOS sdk? I'm asking this, because we need to access closed conversations for history purposes.

Pietroid96
  • 17
  • 4
  • That is unexpected (to me at least). I have raised this with the Conversations team and will get back to you with what they say. – philnash Sep 02 '22 at 02:32
  • Actually, I realized that the conversation wasn't yet synchronized properly. We must wait for the SynchronizationStatus to be ALL before doing any operation. For active conversations, the conversation is already obtained with the ALL status, but for closed conversations it takes some time. Thanks, anyway! – Pietroid96 Sep 02 '22 at 18:49

1 Answers1

0

I managed to make it work properly. We must wait for the conversation synchronization status to be ALL, so we can obtain all messages and listen properly to new events.

With active conversations the returned conversation is already with ALL status, so that's the reason why I could get all the messages normally. But with closed conversations it takes some extra time to synchronize completly.

Pietroid96
  • 17
  • 4