intergram icon indicating copy to clipboard operation
intergram copied to clipboard

Clearing old chats

Open cyberboysumanjay opened this issue 7 years ago • 2 comments

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!

cyberboysumanjay avatar Jul 02 '17 15:07 cyberboysumanjay

Would also love to get that to work. Currently I have to do it manually from telegram app itself which is very time consuming.

amitozdeol avatar Jul 17 '17 12:07 amitozdeol

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.

idoco avatar Sep 14 '17 21:09 idoco