0👍
You need a "history" function.
Assuming you can uniquely identify chats between folks, you can publish the last N messages in history for the users on connect, giving a seamless experience controlled from the server side.
This can be complex, but assuming your frontend can re-order it it works great.
Failing that, create an API route for this where a user can query their chat ID and get the last N messages OR the messages with timestamps between the queried period.
All this is easier if you have some kind of time series database for storing the chat, as they are all about fast insertion and time centric query tools. QuestDB is awesome for this.
This is how we’ve implemented Rewind and History in Ably, and it’s used for many large scale chat applications.
- [Answered ]-Django: Extend template by return value of template tag
- [Answered ]-Twitter typeahead.js autocomplete remote not working
- [Answered ]-Select those objects whose related objects IDs are *all* in given string
- [Answered ]-Pie chart highcharts from django query