Description

Represents a group channel.

Hierarchy

Properties

Accessors

Methods

acceptInvitation addMessageMetaArrayValues addOperators addPollOption addReaction banUser banUserWithUserId cancelScheduledMessage cancelUploadingFileMessage closePoll copyFileMessage copyMessage copyUserMessage createBannedUserListQuery createMemberListQuery createMessageCollection createMessageMetaArrayKeys createMetaCounters createMetaData createMutedUserListQuery createOperatorListQuery createPinnedMessageListQuery createPollListQuery createPollVoterListQuery createPreviousMessageListQuery createScheduledFileMessage createScheduledUserMessage createThreadedParentMessageListQuery declineInvitation decreaseMetaCounters delete deleteAllMetaCounters deleteAllMetaData deleteMessage deleteMessageMetaArrayKeys deleteMetaCounter deleteMetaData deletePoll deletePollOption deleteReaction endTyping freeze getAllMetaCounters getAllMetaData getDeliveryStatus getMessageChangeLogsSinceTimestamp getMessageChangeLogsSinceToken getMessagesByMessageId getMessagesByTimestamp getMetaCounters getMetaData getMyMutedInfo getMyPushTriggerOption getPollChangeLogsSinceTimestamp getPollChangeLogsSinceToken getReadMembers getReadStatus getTypingUsers getUndeliveredMemberCount getUnreadMemberCount getUnreadMembers hide increaseMetaCounters invite inviteWithUserIds isEqual isFeedChannel isGroupChannel isIdentical isOpenChannel isReadMessage join leave markAsDelivered markAsRead muteUser muteUserWithUserId pinMessage refresh removeMessageMetaArrayValues removeOperators report reportMessage reportUser resendFileMessage resendMessage resendUserMessage resetMyHistory sendFileMessage sendFileMessages sendMultipleFilesMessage sendScheduledMessageNow sendUserMessage serialize setMyCountPreference setMyPushTriggerOption startTyping translateUserMessage unbanUser unbanUserWithUserId unfreeze unhide unmuteUser unmuteUserWithUserId unpinMessage updateChannel updateFileMessage updateMetaCounters updateMetaData updatePoll updatePollOption updateScheduledFileMessage updateScheduledUserMessage updateUserMessage uploadFile votePoll

Properties

channelType: ChannelType = ChannelType.BASE
coverUrl: string = ''

The cover image URL.

creator: null | User = null

A User who created the channel. null if it's created by system.

customType: string = ''

The custom type of the channel.

data: string = ''

The channel data.

hiddenState: HiddenState = HiddenState.UNHIDDEN

The HiddenState of this channel.

invitedAt: number = 0

My invitation timestamp.

inviter: null | User = null

The inviter of the current user to this channel.

isAccessCodeRequired: boolean = false

Whether this channel requires access code to join. This value is valid only if this channel is a public GroupChannel.

isBroadcast: boolean = false

Checks whether this channel is a broadcast GroupChannel.

isChatNotification: boolean = false

Checks whether this channel is a chat notification GroupChannel.

isDiscoverable: boolean = true

Checks whether this channel is discoverable in the result of PublicGroupChannelListQuery. If it is false, it will not appear on the result of PublicGroupChannelListQuery.

isDistinct: boolean = false

Checks whether this channel is a distinct GroupChannel. For a distinct GroupChannel, later when you create GroupChannel with same User and isDistinct flag being true (refer to createChannel), the channel URL does not change, which means the messages between Users remain at the channel. If the channel is not distinct one, a new GroupChannel is created even though Users are same. As a result, you get a totally new channel URL (the old channel still remains), which means the Users start new conversation.

isEphemeral: boolean = false

Whether the channel is ephemeral.

isExclusive: boolean = false

Checks whether this channel is an exclusive GroupChannel.

isFrozen: boolean = false

Whether the channel is frozen.

isPublic: boolean = false

Checks whether this channel is a public GroupChannel.

isPushEnabled: boolean = false

Deprecated

isSuper: boolean = false

Checks whether this channel is a super GroupChannel.

joinedAt: number = 0

The timestamp when the current user joined.

joinedMemberCount: number = 0

The total joined member count for this channel.

lastMessage: null | BaseMessage = null

The last message of the channel.

lastPinnedMessage: null | BaseMessage = null

The last message among channel's pinned messages.

memberCount: number = 0

The total member count for this channel.

members: Member[] = []

Member list for this channel.

messageOffsetTimestamp: number = 0

This property is set when resetMyHistory or hide is called.

myCountPreference: CountPreference = CountPreference.ALL

Checks whether unread message count is enabled for this channel. This count preference can be set by setMyCountPreference.

myLastRead: number = 0

Current user's last read receipt timestamp in channel.

myMemberState: MemberState = MemberState.NONE

My member state.

myMutedState: MutedState = MutedState.UNMUTED

My muted state in this channel.

myPushTriggerOption: PushTriggerOption = PushTriggerOption.DEFAULT

My push trigger option. The push trigger setting can be updated by setMyPushTriggerOption.

myRole: Role = Role.NONE

My Role in this channel.

pinnedMessageIds: number[] = []

The pinned message IDs of the channel.

totalUnreadReplyCount: number = 0

The total unread reply count for this channel.

unreadMentionCount: number = 0

The unread mention count for this channel for the current user.

unreadMessageCount: number = 0

The unread message count for this channel for the current user.

Accessors

  • get cachedMetaData(): object
  • All locally cached metadata as a map.

    Returns object

  • get cachedUndeliveredMemberState(): object
  • Snapshot of member delivery state map.

    Returns object

  • get cachedUnreadMemberState(): object
  • Snapshot of member reading state map.

    Returns object

  • get createdAt(): number
  • The creation time of the channel in milliseconds.

    Returns number

  • get isHidden(): boolean
  • Checks whether this channel is hidden.

    Returns boolean

  • get isTyping(): boolean
  • Whether one or more members are typing.

    Returns boolean

  • get messageCollectionLastAccessedAt(): number
  • The local timestamp of when this channel has been used in a MessageCollection.

    Returns number

  • get name(): string
  • The topic or name of the channel.

    Returns string

  • set name(value): void
  • Parameters

    • value: string

    Returns void

  • get url(): string
  • The unique channel URL.

    Returns string

Methods

  • Parameters

    • Optional accessCode: string

    Returns Promise<GroupChannel>

    Description

    Accepts the invitation sent to the current user. After the acceptance, the user will be joined to the channel.

  • Parameters

    • userIds: string[]

    Returns Promise<void>

    Description

    Add operators to the channel.

  • Parameters

    • pollId: number
    • optionText: string

    Returns Promise<Poll>

    Description

    Adds an option with optionText to this poll. Once added successfully, a non-null Poll instance will be passed to the result.

  • Parameters

    • user: User
    • Optional duration: number
    • Optional description: string

    Returns Promise<void>

    Description

    Bans a member. Operators can ban members from this channel. Banned member is kicked out of this channel and cannot enter during the specified seconds. If you want to ban the user indefinitely, pass -1 to seconds as the argument.

  • Parameters

    • userId: string
    • Optional duration: number
    • Optional description: string

    Returns Promise<void>

    Description

    Bans a member with userId.

  • Parameters

    • scheduledMessageId: number

    Returns Promise<void>

    Description

    Cancels a scheduled message with scheduledMessageId.

  • Parameters

    • pollId: number

    Returns Promise<Poll>

    Description

    Closes this poll. Once closed successfully, a non-null Poll instance will be passed to the result.

  • Returns Promise<GroupChannel>

    Description

    Declines the invitation sent to the current user.

  • Returns Promise<void>

    Description

    Deletes this GroupChannel. Note that only operators of a channel are able to delete it. Otherwise, an error will be thrown.

  • Parameters

    • key: string

    Returns Promise<void>

    Description

    Deletes a meta counter.

  • Parameters

    • key: string

    Returns Promise<void>

    Description

    Deletes a meta data.

  • Parameters

    • pollId: number

    Returns Promise<void>

    Description

    Deletes this poll. Once deleted successfully, null will be passed to the result.

  • Parameters

    • pollId: number
    • pollOptionId: number

    Returns Promise<void>

    Description

    Deletes this poll option.

  • Returns Promise<void>

    Description

    Sends end typing event.

  • Returns Promise<void>

    Description

    Freezes the channel. No one could send a message in a frozen channel.

  • Parameters

    • includeAllMembers: boolean = true

    Returns null | {
        [key: string]: DeliveryStatus;
    }

    Description

    Gets delivered time for all members in this channel.

  • Parameters

    • message: BaseMessage
    • includeAllMembers: boolean = false

    Returns Member[]

    Description

    Gets the member list who have read the given message.

  • Parameters

    • includeAllMembers: boolean = false

    Returns null | {
        [key: string]: ReadStatus;
    }

    Description

    Gets ReadStatus for all members in this channel.

  • Returns Member[]

    Description

    The typing user list.

  • Parameters

    Returns number

    Description

    Returns the number of member's that haven't received the given message. This excludes the current user and the Sender of the message. It will always be zero if the passed on message is an AdminMessage, or if this channel is a super group channel.

  • Parameters

    Returns number

    Description

    Returns the number of member's that haven't read the given message. This excludes the current user and the Sender of the message. It will always be zero if the passed on message is an AdminMessage, or if this channel is a super group channel.

  • Parameters

    • message: BaseMessage
    • includeAllMembers: boolean = false

    Returns Member[]

    Description

    Gets the member list who haven't read the given message.

  • Parameters

    • userIds: string[]

    Returns Promise<GroupChannel>

    Description

    Invites Users with userIds.

  • Parameters

    Returns boolean

    Description

    Whether the given channel is equal in all the values of this channel.

  • Parameters

    Returns boolean

    Description

    Whether the given channel is identical to this channel.

  • Parameters

    Returns boolean

    Description

    Checks if the current user has read the message.

  • Parameters

    • Optional accessCode: string

    Returns Promise<GroupChannel>

    Description

    Joins this channel if this channel is public.

  • Parameters

    • shouldRemoveOperatorStatus: boolean = false

    Returns Promise<void>

    Description

    Leaves this channel.

  • Returns Promise<void>

    Description

    Sends mark as delivered to this channel.

  • Returns Promise<void>

    Description

    Sends mark as read to this channel.

  • Parameters

    • user: User
    • Optional duration: number
    • Optional description: string

    Returns Promise<void>

    Description

    Mutes a User. A muted user cannot send a message.

  • Parameters

    • userId: string
    • Optional duration: number
    • Optional description: string

    Returns Promise<void>

    Description

    Mutes a User with userId. A muted user cannot send a message.

  • Parameters

    • messageId: number

    Returns Promise<void>

    Description

    Pins a message to the channel.

  • Parameters

    • userIds: string[]

    Returns Promise<void>

    Description

    Remove operators from the channel.

  • Parameters

    Returns Promise<void>

    Description

    Reports this channel of inappropriate activities.

  • Parameters

    Returns Promise<void>

    Description

    Reports a user of suspicious activities.

  • Returns Promise<GroupChannel>

    Description

    Resets the chat history of this channel for the current user. After this call, the messages created before the call will not be loaded.

  • Parameters

    • scheduledMessageId: number

    Returns Promise<void>

    Description

    Sends a scheduled message now.

  • Returns Promise<void>

    Description

    Sends start typing event.

  • Parameters

    Returns Promise<void>

    Description

    Unbans User. Operators can unban User who has been banned from this channel.

  • Parameters

    • userId: string

    Returns Promise<void>

    Description

    Unbans User with userId.

  • Returns Promise<void>

    Description

    Unfreezes the channel.

  • Parameters

    Returns Promise<void>

    Description

    Unmutes User. The unmuted user could send a message again.

  • Parameters

    • userId: string

    Returns Promise<void>

    Description

    Unmutes User with userId. The unmuted user could send a message again.

  • Parameters

    • messageId: number

    Returns Promise<void>

    Description

    Removes the message from the channel's pinned messages.

  • Parameters

    Returns Promise<FileMessage>

    Description

    Updates a FileMessage that was previously sent in the channel. Note that the file itself cannot be changed; only the fields stored within the message can be modified.

  • Parameters

    Returns Promise<Poll>

    Description

    Updates fields of this poll with given params. Once updated successfully, a non-null Poll instance will be passed to the result.

  • Parameters

    • pollId: number
    • pollOptionId: number
    • optionText: string

    Returns Promise<Poll>

    Description

    Updates optionText fields of this poll option. Once updated successfully, a non-null Poll instance will be passed to the result.

  • Parameters

    Returns Promise<FileMessage>

    Description

    Update a scheduled file message with scheduledMessageId and ScheduledFileMessageUpdateParams.

  • Parameters

    Returns Promise<UserMessage>

    Description

    Update a scheduled user message with scheduledMessageId and ScheduledUserMessageUpdateParams.

  • Parameters

    • pollId: number
    • pollOptionIds: number[]

    Returns Promise<PollVoteEvent>

    Description

    Vote on pollOptionIds. This operation overrides previous vote actions, so to update previous vote, pass new pollOptionIds as parameter. To cancel votes, pass an empty list as pollOptionIds.

Generated using TypeDoc