Class CommunityChannel
-
- All Implemented Interfaces:
public final class CommunityChannel extends BaseChannel
Community channel.
A channel type that supports sub-channel management, similar to a Discord server. A community channel can contain multiple sub-channels, enabling topic-based message organization.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCommunityChannel.Companion
-
Field Summary
Fields Modifier and Type Field Description private IntegersubChannelCountprivate StringsubChannelIdprivate BooleanisTopForTagprivate LongfirstUnreadMsgSendTimeprivate final StringchannelIdprivate final ChannelTypechannelTypeprivate final IntegerunreadCountprivate final BooleanisPinnedprivate final LongoperationTimeprivate final Stringdraftprivate final MessagelatestMessageprivate final IntegermentionedCountprivate final IntegermentionedMeCountprivate final ChannelNoDisturbLevelnoDisturbLevelprivate final TranslateStrategytranslateStrategyprivate final BooleanincludeRobotprivate final EditedMessageDrafteditedMessageDraftpublic final static CommunityChannel.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description CommunityChannel(String channelId)
-
Method Summary
Modifier and Type Method Description final IntegergetSubChannelCount()Number of sub-channels. final UnitsetSubChannelCount(Integer subChannelCount)Number of sub-channels. final StringgetSubChannelId()The sub-channel ID that this channel belongs to. final UnitsetSubChannelId(String subChannelId)The sub-channel ID that this channel belongs to. final BooleanisTopForTag()Whether this channel is pinned within a tag. final UnitsetTopForTag(Boolean isTopForTag)Whether this channel is pinned within a tag. final LonggetFirstUnreadMsgSendTime()Sent timestamp (milliseconds) of the first unread message. final UnitsetFirstUnreadMsgSendTime(Long firstUnreadMsgSendTime)Sent timestamp (milliseconds) of the first unread message. final UnitgetUnreadCount(OperationHandler<Integer> handler)Gets the unread message count for this community channel (with sub-channel). final UnitgetSubChannels(OperationHandler<List<CommunitySubChannel>> handler)Gets all sub-channels of this community channel. Unitpin(PinParams params, OperationHandler<Boolean> handler)Pins this community channel (sub-channel) to the top. Unitunpin(OperationHandler<Boolean> handler)Unpins this community channel (sub-channel) from the top. UnitclearUnreadCount(OperationHandler<Boolean> handler)Clears the unread message count for this community channel (with sub-channel). UnitgetUnreadMentionedMessages(OperationHandler<List<Message>> handler)Gets unread mentioned messages in this community channel. -
Methods inherited from class ai.nexconn.chat.channel.BaseChannel
clearDraft, delete, deleteLocalMessages, deleteMessageForAll, deleteMessagesForMe, deleteMessagesForMeByTimestamp, deleteTags, equals, getChannelId, getChannelType, getDraft, getEditedMessageDraft, getFirstUnreadMessage, getIncludeRobot, getLatestMessage, getMentionedCount, getMentionedMeCount, getMessageReadReceiptInfo, getMessagesAroundTime, getMessagesReadReceiptByUsers, getNoDisturbLevel, getOperationTime, getTags, getTranslateStrategy, getUnreadCount, hashCode, insertMessages, isPinned, modifyMessage, reload, saveDraft, sendMediaMessage, sendMessage, sendReadReceiptResponse, setNoDisturbLevel, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getSubChannelCount
final Integer getSubChannelCount()
Number of sub-channels.
-
setSubChannelCount
final Unit setSubChannelCount(Integer subChannelCount)
Number of sub-channels.
-
getSubChannelId
final String getSubChannelId()
The sub-channel ID that this channel belongs to.
-
setSubChannelId
final Unit setSubChannelId(String subChannelId)
The sub-channel ID that this channel belongs to.
-
isTopForTag
final Boolean isTopForTag()
Whether this channel is pinned within a tag. Only valid when the channel is retrieved via a tag query.
-
setTopForTag
final Unit setTopForTag(Boolean isTopForTag)
Whether this channel is pinned within a tag. Only valid when the channel is retrieved via a tag query.
-
getFirstUnreadMsgSendTime
final Long getFirstUnreadMsgSendTime()
Sent timestamp (milliseconds) of the first unread message. Only valid for community channels.
-
setFirstUnreadMsgSendTime
final Unit setFirstUnreadMsgSendTime(Long firstUnreadMsgSendTime)
Sent timestamp (milliseconds) of the first unread message. Only valid for community channels.
-
getUnreadCount
final Unit getUnreadCount(OperationHandler<Integer> handler)
Gets the unread message count for this community channel (with sub-channel).
Uses the current subChannelId to query unread count.
- Parameters:
handler- Callback returning the unread count on success
-
getSubChannels
final Unit getSubChannels(OperationHandler<List<CommunitySubChannel>> handler)
Gets all sub-channels of this community channel.
- Parameters:
handler- Callback returning the list of sub-channels on success
-
pin
Unit pin(PinParams params, OperationHandler<Boolean> handler)
Pins this community channel (sub-channel) to the top.
Uses subChannelId to identify the target sub-channel.
- Parameters:
params- Pin parametershandler- Callback returning the operation result
-
unpin
Unit unpin(OperationHandler<Boolean> handler)
Unpins this community channel (sub-channel) from the top.
Uses subChannelId to identify the target sub-channel.
- Parameters:
handler- Callback returning the operation result
-
clearUnreadCount
Unit clearUnreadCount(OperationHandler<Boolean> handler)
Clears the unread message count for this community channel (with sub-channel).
Uses subChannelId to sync read status for the target sub-channel.
- Parameters:
handler- Callback returning the operation result
-
getUnreadMentionedMessages
Unit getUnreadMentionedMessages(OperationHandler<List<Message>> handler)
Gets unread mentioned messages in this community channel.
Uses subChannelId to identify the target sub-channel.
- Parameters:
handler- Callback returning the list of unread mentioned messages on success
-
-
-
-