setMemberMeta

View as Markdown

setMemberMeta

  • setMemberMeta(params): Promise<void>

Assigns custom metadata to the specified RoomSession member. You can use this to store metadata whose meaning is entirely defined by your application.

Note that calling this method overwrites any metadata that had been previously set on the specified member.

Parameters

NameTypeDescription
paramsObject-
params.memberIdstringId of the member to affect.
params.metaRecord``<string, unknown>The medatada object to assign to the member.

Returns

Promise<void>

Example

Setting metadata for a member:

1await roomSession.setMemberMeta({
2 memberId: 'de550c0c-3fac-4efd-b06f-b5b8614b8966' // you can get this from getMembers()
3 meta: {
4 email: 'joe@example.com'
5 }
6})