Hi! I need some custom properties to be stored for each user. For example, user's level in game. And I also need to update this properties. If user has just raised its level, it would be confusing that old messages are shown with the old level to other persons. How can I make this work within Photon Chat?
I also want to mention one thing - for now I just send some additional metadata as JSON string in the message content. Can this approach be considered correct for Photon Chat SDK?
How can I make this work within Photon Chat?
Can this approach be considered correct for Photon Chat SDK?
You actually use the approach we suggest usually.
Photon Chat allows you to exchange anything serializable/supported by Photon.
So this approach is OK.
Another trick you could use to optimize and improve this:
Chat's online status feature allows a user to broadcast a custom message to all other users who have added him as a friend via AddFriends. This custom message could include the user's properties and other things. This could save some extra messages in chat channels. More information here.