question

jeffcord97 avatar image
jeffcord97 asked

Entity Group Hosts

How do you set a specific user to be the host/leader of a newly created entity group? How do you transfer that control to another user in the entity group? Also, how should I go about programmatically checking if a user is the host of the group they're currently in?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

>> How do you set a specific user to be the host/leader of a newly created entity group?

For the Entity Group, the creator should be the default administrator. Both servers and clients can use CreateGroup API to create an entity group. When you use the title’s entity to create a group, the default administrator of the group would be the title. If you use the title player account’s entity to create the group, the default administrator would be this title player account. If you want to add an additional administrator for the group, you can use this API AddMembers to add this player and set it as the administrator. If you want to assign the admin access to another group member, you can use this API ChangeMemberRole to change the specific member’s role.

>> How do you transfer that control to another user in the entity group?

As the first answer said, you can use the API ChangeMemberRole, AddMembers to add the new administrator. An Entity Group can have multiple administrators. When you add a new administrator in the group, the old administrator won’t be changed. If you need to change the old administrator’s role to the member, you need to call the API ChangeMemberRole.

>> Also, how should I go about programmatically checking if a user is the host of the group they're currently in?

You can call this API IsMember to check that if an entity is the specific role of the group. You need to provide the GroupId, RoleId and member’s Entity in the request body. This API would only return “true”or “false“.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.