Getting old messages after reconnect a room

edited August 29 in Photon Chat
Hi guys,

I created two separate rooms and sent a private message from "player1" who is in "room1" to "player2" who is in "room2". Player2 received the private message successfully. After that, Player2 leave "room2" and joined "room1". After joining, Player2 received the old message from Player1 again (Player1 didn't send it again). How can I prevent this?

Thanks.

Comments

  • Hi @HisAirness,

    Thank you for choosing Photon!

    What client SDK are you using?
    What version?

    In Photon Chat, there are channels and not rooms.
    You are maybe referring to rooms from Photon Realtime or PUN as you are probably combining both products.

    Anyways, it looks like you are subscribing to the same channel and requesting history.
    A channel can have up to 100 messages in history.
    Empty channels where no one is still subscribed will be destroyed on Photon servers after a timeout.
    So either subscribe to a new channel (new name) or do not request channel history messages from the server when subscribing.
Sign In or Register to comment.