Expand my Community achievements bar.

How to clear Chat History

Avatar

Level 1

How to clear Chat History using php or is there a configuration in the consul to limit the chat history and the older messages will delete automatically

2 Replies

Avatar

Level 1

Hello any answer w/ this. I tried using fetchItems, and retractItem functions but the fetchItems returning string and I dont know how to explode. please help me. we are having trouble right now.

Avatar

Former Community Member

Hi,

There are no room console API to limit to chat history other than deleting some items manually by going to Explore tab's items. Currently the entire history gets cleared automatically. If you want to delete some messages now, you would have to subsclass some of the functions inside SimpleChatModel.as.

You can see the clear function for deleting the complete chat history inside SimpleChatModel.as. Basically, you need to delete the nodes and create them again. You can do this using PHP also by using our ServerToServer API to delete and create the nodes.

However, we plan to do some changes to our SimpleChatModel in future which will include allowing users to delete some messages. This will be coming in second half timeframe of year.

Hope this helps

Thanks

Regards

Hironmay Basu