How to display time passed since receving a chat message?

I had Implemented Chat and need to show when did the last message receive. like on each message it should be written – mins ago. Now I dont understand how to implement.

:tv: Media:

Screenshot 2021-08-18 162401

@Muhammad079 Each message received contains a “create time”, you can use this to power what you need.

The formatting of this timestamp for display purposes is up to the client. In your case you can compare the message time with current device time to determine how to display what you want. :+1:

Hi @Muhammad079 welcome to the Heroic Labs forums :partying_face: I moved your question to the Game Design category as it’s about how to use Nakama’s features to build your game. I also summarised your topic with a shorter title which will make it easier for others to contribute.

Thank you for using Nakama and welcome to our community :grinning: if you haven’t already read our guides I recommend starting with Welcome to the Heroic Labs forums - #11

1 Like