- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi ,
I differ with the earlier post as changing the itemStorage scheme from queue to single item would send you just one message at a time. So when you will be in a room, you will just get the last message. The right parameter to change is persistItems. Here is what you can do.
There is a setNodeConfiguration API in SimpleChatModel class where you need to set the nodeConfiguration for History Nodes with the value persisItems as false. The default value for persistItems in all history nodes is true.
There is a history node for everyone called HISTORY_NODE_EVERYONE. And there are history nodes called HISTORY_NODE_PARTICIPANTS and HISTORY_NODE_HOSTS which are used to if you are sending it to only hosts to only hosts and participents.
The way you can change the persistItems
var nodeConf:NodeConfiguration = model.getConfiguration(nodeName);
nodeConf.persistItems =false ;
mode.setConfiguration(nodeName, nodeConf);
Now , One thing i wanted to point here is whenever u clear the the chat , it actually deletes and recreates the history nodes with the old configuration. So, you might have to be careful that if you are clearling the chat, then you might need to change the persistItems again like above.
Another option is , the two functions onSynchronizationChange and clear are the places where we create the History Nodes , you can override them to create the nodes with your nodeConfigurations. And to know more about persistItems parameter in NodeConfiguration, please look at docs of NodeConfiguration.
Thanks
Hironmay Basu
Views
Replies
Total Likes