Optional lastMessage: DecodedMessageUnion<ContentTypes>Optional commitOptional lastidentities to add to the group
Deletes a message from the dm. You must be the sender of the message or a super admin of the conversation in order to delete the message.
The id of the message to delete.
A Promise that resolves to the id of the deleted message.
Returns the disappearing message settings. To get the latest settings from the network, call sync() first.
A Promise that resolves to the disappearing message settings.
This method returns an array of enriched messages (V2) associated with the group. Enriched messages include additional metadata like reactions, delivery status, and more. To get the latest messages from the network, call sync() first.
Optional opts: EnrichedMessagesOptionsOptional parameters for filtering messages.
A Promise that resolves to an array of DecodedMessageV2 objects.
A Promise that resolves to a list of conversation topics that can be used to subscribe to push notifications.
A Promise that resolves to debug information that can help debug issues with the conversation
This method returns an array of messages associated with the group. To get the latest messages from the network, call sync() first.
Optional opts: MessagesOptionsA Promise that resolves to an array of DecodedMessage objects.
This method returns an array of messages associated with the group. To get the latest messages from the network, call sync() first.
Optional opts: MessagesOptionsA Promise that resolves to an array of DecodedMessage objects, each of which will contain any related reactions under the childMessages property.
Prepare a group message to be sent.
The content of the message. It can be either a string or a structured MessageContent object.
Optional opts: SendOptionsThe options for the message.
Optional noSend: booleanWhen true, the prepared message will not be published until [publishMessage] is called with the returned message ID. When false (default), uses optimistic sending and the message will be published with the next [publishMessages] call.
A Promise that resolves to a string identifier for the prepared message to be sent.
Throws an error if there is an issue with sending the message.
Publishes a message that was prepared with noSend = true.
The id of the message to publish.
A Promise that resolves when the message is published.
identities to remove from the group
Sends a message to the current group.
The content of the message. It can be either a string or a structured MessageContent object.
Optional opts: SendOptionsA Promise that resolves to a string identifier for the sent message.
Throws an error if there is an issue with sending the message.
Sets up a real-time message stream for the current group.
This method subscribes to incoming messages in real-time and listens for new message events. When a new message is detected, the provided callback function is invoked with the details of the message. Additionally, this method returns a function that can be called to unsubscribe and end the message stream.
A callback function that will be invoked with the new DecodedMessage when a message is received.
Optional onClose: (() => void)Optional callback to invoke when the stream is closed.
A function that, when called, unsubscribes from the message stream and ends real-time updates.
Updates the disappearing message settings. Will throw if the user does not have the required permissions.
The new disappearing message setting.
A Promise that resolves when the settings are updated.
inboxIds to add to the group