Expand my Community achievements bar.

persistantItems wont go away.

Avatar

Level 4

I'm unchecking persist Items and retracting all nodes from my chat. but there are still items that keep showing up in my app.

also have user and sesson dependent items turned off

the items are not in the room manager but they show up in my app. i cant kill it.

any ideas?

thanks.

...russ

3 Replies

Avatar

Former Community Member

Hi,

I just ran the case you mentioned.

This was my workflow :

I connected to a room in a chat application and sent a message A.

Then I went into room console and could find that message. I checked off persistItems from history node for that chat.

I then sent another message B.

I logged in another client and I could see only message A which is fine. However , even if I am retracting the message A now from room console, it still keeps popping for me when I log in.

The reason I believe is that those messages that were sent before you set persistItems and sessionDependentItems to false keeps lingering and doesn't get cleared.

When you say, you retracted nodes, do you mean you retracted items or nodes ? Because even though item retraction didn’t work from me, but if you delete the history nodes for chat and recreate them in room console, you should be able to get rid of all your message. Another way to do this is calling simpleChat.model.clear() to clear all the history. That should take care of your old messages.

Does this work for you ?

Meanwhile, the fact that after setting persistItems to false we can't retract the messages sent earlier calls for investigation on our part which I will look into.

Hope this helps

Thanks

Hironmay Basu

Avatar

Former Community Member

Hi,

We have fixed this issue in dev console. Now, whenever you set persistItem to false, if there were any items that remained when persistItems was true then they would get retracted. The fix was an edge case and thanks for pointing this out. This will be updated in the next drop of our SDK in coming months.

In the meanwhile, you can follow either of the two approaches

a) You delete all the existing persist items in a node in dev console before switching off the persist Items.

b) Delete and recreate the node. This option may be bit risky as you may loose other custom changes in your node configuration for this node.

Regarding chat, one of the simplest way as I mentioned earlier is to call simpleChat.model.clear() which clears all the history data by deleting and recreating the nodes.

Hope this helps

Thanks

Hironmay Basu

Avatar

Level 4

Hironmay,

Thanks for the response. I should have been a little more clear, I made my own collection node, and an item within that node keeps being persistant.

So even when I retracted that node in the console it would keep coming back.

What I would do is not listen for a Item Receive event until after the client posted a new item. Then i would start with what ever was just posted.

(hope that makes sense)

So in this case I dont have a history node but that sounds like a great idea (wish i thought of that)

Maybe I'm not understanding persistence. It is on the node level that you set up weather an item (in my case chat text) is persistant. Then you can decide if its always there or based on session or user?

Thanks for your help.

...russ