Group
The Group class represents a group conversation between multiple inboxes. It inherits from the Conversation class and provides group-specific functionality.
Class: Group
Constructor
constructor(client: Client, id: string, data?: SafeConversation): Initializes a new group conversation instance.
Properties
name: string: The name of the group.imageUrl: string: The image URL of the group.description: string: The description of the group.admins: string[]: The list of admins of the group by inbox ID.superAdmins: string[]: The list of super admins of the group by inbox ID.
Instance Methods
async sync(): Promise<SafeConversation>: Synchronizes the group's data with the network.async updateName(name: string): Promise<void>: Updates the group's name.async updateImageUrl(imageUrl: string): Promise<void>: Updates the group's image URL.async updateDescription(description: string): Promise<void>: Updates the group's description.async listAdmins(): Promise<string[]>: Fetches and updates the list of group admins from the server.async listSuperAdmins(): Promise<string[]>: Fetches and updates the list of group super admins from the server.async permissions(): Promise<SafeConversation["permissions"]>: Retrieves the group's permissions.async updatePermission(permissionType: PermissionUpdateType, policy: PermissionPolicy, metadataField?: MetadataField): Promise<void>: Updates a specific permission policy for the group.async isAdmin(inboxId: string): Promise<boolean>: Checks if an inbox is an admin of the group.async isSuperAdmin(inboxId: string): Promise<boolean>: Checks if an inbox is a super admin of the group.async addMembersByIdentifiers(identifiers: Identifier[]): Promise<void>: Adds members to the group using identifiers.async addMembers(inboxIds: string[]): Promise<void>: Adds members to the group using inbox IDs.async removeMembersByIdentifiers(identifiers: Identifier[]): Promise<void>: Removes members from the group using identifiers.async removeMembers(inboxIds: string[]): Promise<void>: Removes members from the group using inbox IDs.async addAdmin(inboxId: string): Promise<void>: Promotes a group member to admin status.async removeAdmin(inboxId: string): Promise<void>: Removes admin status from a group member.async addSuperAdmin(inboxId: string): Promise<void>: Promotes a group member to super admin status.async removeSuperAdmin(inboxId: string): Promise<void>: Removes super admin status from a group member.
Last updated