IConversationStore.addMember() method
Add a member to a conversation
Signature
addMember(conversationId: ConversationId, userId: UserId, init: Partial<IMemberCreate>): Promise<IMember>;
Remarks
The current user must be a member of the conversation to be able to add another member, and unless the membersCanAddUsers
setting is true, the current user must also be an owner.
Parameters
Parameter | Type | Description |
---|---|---|
conversationId | ConversationId | The conversation to add a member to |
userId | UserId | The user to add to the conversation |
init | Partial<IMemberCreate> | Initial settings for the member. Any setting that is not included will have default values. |
Returns
Type | Description |
---|---|
Promise<IMember> | The member object |
Throws
Error |
---|