intergram
intergram copied to clipboard
Clearing old chats
Hey! @idoco thanks for this awesome work! I was interested to know can you implement something so that once the user leaves the conversation, the chat is cleared automatically so that if he/she joins the conversation again previous chats are not there. Or may be a time limit for storing messages. It will be great!
Would also love to get that to work. Currently I have to do it manually from telegram app itself which is very time consuming.
Sounds pretty easy to implement. We can add this as a boolean option in the config object resetHistoryOnStartup
that will be passed on to chat.js. when set to true we can usestore.set(this.messagesKey, [])
to clear the chat history.
This will work very well for single page websites, but not for multi-page website where it will reset the chat every time you navigate within the website.