How to list all chat rooms

Not sure if this was the correct category, but I was wondering how we can use the Nakama Console to view all the chat rooms / group chats / direct chats?

Currently, it seems we have to manually know the names to see logs of messages. If not possible through the console, is there an alternative way to see all the data? It feels weird knowing its in the database but not being able to see it.

Thanks for any help!

Hi @Zeroxidic

I think this post (link) may give you some insights about the design and what can be done to view such info. However, the short answer is no since the server holds no explicit concept that aggregates messages, it only has records of messages from something to something else with additional metadata (table schema).

What an interesting concept, thank you!

On a sidenote then, is there a way to delete these messages?

In my use case, the chat is only used on a per match basis (the matches themselves are client relayed since very little information is required)

Thinking about how to write it out, I realize it sounds very similar to how ‘Among Us’ handles multiplayer.

  1. Player connects either by match list or a code
  2. Automatically joins the chat room for that match
  3. can optionally send private messages to groups of players or individuals themselves (that are in the match)
  4. once the match is over, the chat is erased never to be used again

That last part, is where my concern comes from since technically if the chats cannot be viewed from the dashboard and are still saved within nakama/database, it would add up and take a lot of storage.

Thanks again for the quick and detailed response.

not sure for client relayed matches. But in authorative matches, you just add some code to the leave-handler, and when the last user left, you call a cleanup function (i think you have to list all messages and delete them manually)

1 Like

There is another way which is to not even persist the messages but this depends on if recently joined players should be able access past messages or not.

I ended up doing this, its all meant to be temporary! thanks