0

I have checked all the possibility to get the last message and unread message count from the Twilio channel. When tried to get the last message from the channel that I faced threading issue and also it was very slow.

So can anyone help me to achieve these things.

1 Answers1

0

Channel descriptor contains unread message count but to get last message index you will have to retrieve full Channel from the descriptor (that's a server roundtrip) and then get the message from the channel by its index (that's another roundtrip), so it's going to be relatively slow. Best is to offload this operation to background thread and update view lazily when this information is available.

Berkus
  • 345
  • 1
  • 8