Check Joined To Group From Account

Hi, I’m using Unity SDK for Nakama

Is there any way to check if an IApiAccount already joined to a group without using ListUserGroupsAsync?

Use case is, whenever an app is relaunch, if user already joins a group they will automatically join group chat.

Right now the possible way is doing ListUserGroupsAsync and then joining group chat with the group id or by saving the group id locally, but rather than that we want to only GetAccountAsync -> get their group id, then automatically join group chat.

Is this possible?


ListUserGroupsAsync is how you check which groups a user is part of. This data does not belong on the account itself so it needs to be retrieved separately.

If you’re looking to avoid this request then caching the group ID (or IDs) on the client is the way to go, but if this is for optimisation purposes I wouldn’t worry about it. The call to retrieve user groups is very well optimised.