Optional
lastMessage: DecodedMessage<ContentTypes>Optional
lastA Promise that resolves when the inboxId is added to the group admins. Will throw if the user does not have the required permissions.
inboxIds to add to the group
A Promise that resolves when the inboxId is added to the group super admins. Will throw if the user does not have the required permissions.
whether a given inboxId is an admin of the group. To get the latest admin status from the network, call sync() first.
whether a given inboxId is a super admin of the group. To get the latest super admin status from the network, call sync() first.
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.
Prepare a group message to be sent.
The content of the message. It can be either a string or a structured MessageContent object.
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.
A Promise that resolves when the inboxId is removed from the group admins. Will throw if the user does not have the required permissions.
inboxIds to remove from the group
A Promise that resolves when the inboxId is removed from the group super admins. Will throw if the user does not have the required permissions.
Sends a message to the current group.
The content of the message. It can be either a string or a structured MessageContent object.
A 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.
A function that, when called, unsubscribes from the message stream and ends real-time updates.
Generated using TypeDoc
addresses to add to the group