GroupChannel

public final class GroupChannel extends BaseChannel

Group channel.

Represents a multi-user group chat channel. Supports member management, join/leave operations, group info updates, and more.

Inherits from BaseChannel and supports message querying and unread count management.

Constructors

Link copied to clipboard
public GroupChannel GroupChannel(String channelId)

Types

Link copied to clipboard
public class Companion

Properties

Link copied to clipboard
public final static GroupChannel.Companion Companion
Link copied to clipboard
private Integer maxMemberCount

Maximum allowed member count for the group.

Link copied to clipboard
private Integer memberCount

Current member count of the group.

Inherited properties

Link copied to clipboard
private final String channelId

Channel unique identifier

Link copied to clipboard
private final ChannelType channelType

Channel type

Link copied to clipboard
private final String draft

Text message draft content for this channel.

Link copied to clipboard

Draft info for an edited message.

Link copied to clipboard
private final Boolean includeRobot

Whether this channel contains a robot/bot user.

Link copied to clipboard
private final Boolean isPinned

Whether this channel is pinned to the top.

Link copied to clipboard
private final Message latestMessage

The latest message in this channel.

Link copied to clipboard
private final Integer mentionedCount

Unread count of mentioned messages (including @all).

Link copied to clipboard
private final Integer mentionedMeCount

Unread count of messages that specifically mention the current user.

Link copied to clipboard

Channel message push notification level.

Link copied to clipboard
private final Long operationTime

Channel operation timestamp in milliseconds.

Link copied to clipboard

Channel translation strategy.

Link copied to clipboard
private final Integer unreadCount

Unread message count.

Functions

Link copied to clipboard
public final Unit acceptApplication(AcceptGroupApplicationParams params, OperationHandler<Integer> handler)

Accepts a group join application (owner/admin operation).

Link copied to clipboard
public final Unit acceptInvite(String inviterId, ErrorHandler handler)

Accepts a group invitation.

Link copied to clipboard
public final Unit addFavorites(List<String> userIds, ErrorHandler handler)

Adds users to the group's special attention (favorites) list.

Link copied to clipboard
public final Unit addManagers(List<String> userIds, ErrorHandler handler)

Adds group administrators.

Link copied to clipboard
public final Unit dismiss(ErrorHandler handler)

Dismisses (dissolves) this group. Only the group owner can perform this operation.

Link copied to clipboard
public final Unit getFavorites(OperationHandler<List<GroupFollowDetail>> handler)

Gets the list of users in this group's special attention (favorites) list.

Link copied to clipboard
public final Integer getMaxMemberCount()

Maximum allowed member count for the group.

Link copied to clipboard
public final Integer getMemberCount()

Current member count of the group.

Link copied to clipboard
public final Unit getMembers(List<String> userIds, OperationHandler<List<GroupMemberInfo>> handler)

Gets info for specified group members.

Link copied to clipboard

Gets unread mentioned messages in this group channel.

Link copied to clipboard
public final Unit inviteUsers(List<String> userIds, OperationHandler<Integer> handler)

Invites users to join this group.

Link copied to clipboard
public final Unit join(OperationHandler<Integer> handler)

Joins this group.

Link copied to clipboard
public final Unit kickMembers(KickGroupMembersParams params, ErrorHandler handler)

Kicks members from this group.

Link copied to clipboard
public final Unit leave(LeaveGroupConfig config, ErrorHandler handler)

Leaves this group.

Link copied to clipboard

Refuses a group join application (owner/admin operation).

Link copied to clipboard
public final Unit refuseInvite(RefuseGroupInviteParams params, ErrorHandler handler)

Refuses a group invitation.

Link copied to clipboard
public final Unit removeFavorites(List<String> userIds, ErrorHandler handler)

Removes users from the group's special attention (favorites) list.

Link copied to clipboard
public final Unit removeManagers(List<String> userIds, ErrorHandler handler)

Removes group administrators.

Link copied to clipboard
public final Unit setMaxMemberCount(Integer maxMemberCount)

Maximum allowed member count for the group.

Link copied to clipboard
public final Unit setMemberCount(Integer memberCount)

Current member count of the group.

Link copied to clipboard
public final Unit setMemberInfo(SetGroupMemberInfoParams params, ErrorDetailHandler<List<String>> handler)

Sets a group member's nickname and extra info within this group.

Link copied to clipboard
public final Unit transferOwner(TransferGroupOwnerParams params, ErrorHandler handler)

Transfers group ownership to another user.

Link copied to clipboard
public final Unit updateInfo(UpdateGroupInfoParams params, ErrorDetailHandler<List<String>> handler)

Updates group information.

Inherited functions

Link copied to clipboard
public final Unit clearDraft(OperationHandler<Boolean> handler)

Clears the text message draft for this channel.

Link copied to clipboard
public Unit clearUnreadCount(OperationHandler<Boolean> handler)

Clears the unread message count for this channel.

Link copied to clipboard
public final Unit delete(OperationHandler<Boolean> handler)

Deletes this channel locally.

Link copied to clipboard
public final Unit deleteLocalMessages(List<String> messageClientIds, OperationHandler<Boolean> handler)

Deletes local messages by their client IDs.

Link copied to clipboard
public final Unit deleteMessageForAll(Message message, OperationHandler<Message> handler)

Deletes a message for all users (recall).

Link copied to clipboard
public final Unit deleteMessagesForMe(List<Message> messages, ErrorHandler handler)

Deletes messages locally (for the current user only).

Link copied to clipboard

Deletes messages before the specified timestamp (for the current user).

Link copied to clipboard
public final Unit deleteTags(List<String> tagIds, ErrorHandler handler)

Removes tags from this channel.

Link copied to clipboard
public Boolean equals(Object other)
Link copied to clipboard
public final String getChannelId()

Channel unique identifier

Link copied to clipboard
public final ChannelType getChannelType()

Channel type

Link copied to clipboard
public final String getDraft()

Text message draft content for this channel.

Link copied to clipboard

Draft info for an edited message.

Link copied to clipboard

Gets the first unread message in this channel.

Link copied to clipboard
public final Boolean getIncludeRobot()

Whether this channel contains a robot/bot user.

Link copied to clipboard
public final Message getLatestMessage()

The latest message in this channel.

Link copied to clipboard
public final Integer getMentionedCount()

Unread count of mentioned messages (including @all).

Link copied to clipboard
public final Integer getMentionedMeCount()

Unread count of messages that specifically mention the current user.

Link copied to clipboard
public final Unit getMessageReadReceiptInfo(List<String> messageIds, OperationHandler<List<ReadReceiptInfo>> handler)

Gets read receipt info for the specified messages.

Link copied to clipboard

Gets read receipt info by message identifiers.

Link copied to clipboard

Gets messages around a given sent timestamp.

Link copied to clipboard

Gets read receipt details grouped by users.

Link copied to clipboard

Channel message push notification level.

Link copied to clipboard
public final Long getOperationTime()

Channel operation timestamp in milliseconds.

Link copied to clipboard
public final Unit getTags(OperationHandler<List<ChannelTagInfo>> handler)

Gets all tags associated with this channel.

Link copied to clipboard

Channel translation strategy.

Link copied to clipboard
public final Integer getUnreadCount()

Unread message count.

Link copied to clipboard
public Integer hashCode()
Link copied to clipboard
public final Unit insertMessages(List<InsertMessageItem> params, OperationHandler<Boolean> handler)

Batch inserts messages into the local database.

Link copied to clipboard
public final Boolean isPinned()

Whether this channel is pinned to the top.

Link copied to clipboard

Modifies a sent message.

Link copied to clipboard
public Unit pin(PinParams params, OperationHandler<Boolean> handler)

Pins this channel to the top of the channel list.

Link copied to clipboard
public final Unit reload(OperationHandler<BaseChannel> handler)

Reloads channel data from the local database.

Link copied to clipboard
public final Unit saveDraft(String draft, OperationHandler<Boolean> handler)

Saves a text message draft for this channel.

Link copied to clipboard

Sends a media message in this channel (e.g., image, video, file).

Link copied to clipboard
public final Unit sendMessage(SendMessageParams params, SendMessageHandler handler)

Sends a non-media message in this channel (e.g., text, location).

Link copied to clipboard
public final Unit sendReadReceiptResponse(List<String> messageIds, ErrorHandler handler)

Sends a read receipt response for the specified messages.

Link copied to clipboard

Sets the notification (do-not-disturb) level for this channel.

Link copied to clipboard
public String toString()
Link copied to clipboard
public Unit unpin(OperationHandler<Boolean> handler)

Unpins this channel from the top of the channel list.