Last online datetime for user

Hello @jell-o-fishi,

Nakama does not keep track of this automatically, a way of doing it would be to store a timestamp of last activity in the account metadata or a storage object (or use the object built in update_time) within an RPC you know the user will call as part of his play session (but that would not put a lot of pressure by updating this object too often).

Another is to have a before or after hook in one of the Authentication functions and SessionRefresh functions (to make sure that a Refresh will also trigger the update).

Best.

2 Likes