createGroupConversation
Creates a new group conversation with specified members, encryption settings, and member addition policies.
Usage
const conversationName = 'Work Chat';
const isOnlyCreatorAllowedToAddMembers = true;
const isEncrypted = true;
const initialMembers = ['0xAddress1...', '0xAddress2...', '0xAddress3...'];
const txResponse = await chat.createGroupConversation(
conversationName,
isOnlyCreatorAllowedToAddMembers,
isEncrypted,
initialMembers,
);
Returns
Promise<EthereumTransactionResponse>
A promise that resolves to the response from the sendTransaction
method on the walletClient
provided by the developer on Chat
initialization.
Parameters
conversationName
- Type
string
The desired name for the new group conversation.
isOnlyCreatorAllowedToAddMembers
- Type
boolean
Specifies whether only the creator of the group conversation can add new members. If set to true, other members cannot add participants to the group.
isEncrypted
- Type
boolean
Determines if the group conversation should be encrypted. When set to true, all messages within the group will be encrypted.
members
- Type
Address[]
An array of Ethereum addresses representing the initial members of the group conversation. Ensure that these addresses belong to valid participants you want to include in the group.