Represents a feed channel.

Hierarchy (view full)

Properties

Accessors

Methods

addMessageMetaArrayValues addOperators addPollOption addReaction banUser banUserWithUserId cancelUploadingFileMessage closePoll copyFileMessage copyMessage copyUserMessage createBannedUserListQuery createMessageMetaArrayKeys createMetaCounters createMetaData createMutedUserListQuery createNotificationCollection createOperatorListQuery createPinnedMessageListQuery createPollListQuery createPollVoterListQuery createPreviousMessageListQuery decreaseMetaCounters deleteAllMetaCounters deleteAllMetaData deleteMessage deleteMessageMetaArrayKeys deleteMetaCounter deleteMetaData deletePoll deletePollOption deleteReaction freeze getAllMetaCounters getAllMetaData getMessageChangeLogsSinceTimestamp getMessageChangeLogsSinceToken getMessagesByMessageId getMessagesByTimestamp getMetaCounters getMetaData getMyMutedInfo getPollChangeLogsSinceTimestamp getPollChangeLogsSinceToken increaseMetaCounters isEqual isFeedChannel isGroupChannel isIdentical isOpenChannel logClicked logCustom logImpression logViewed markAsClicked markAsRead muteUser muteUserWithUserId pinMessage refresh removeMessageMetaArrayValues removeOperators report reportMessage reportUser resendFileMessage resendMessage resendUserMessage sendFileMessage sendFileMessages sendMultipleFilesMessage sendUserMessage serialize translateUserMessage unbanUser unbanUserWithUserId unfreeze unmuteUser unmuteUserWithUserId unpinMessage updateFileMessage updateMetaCounters updateMetaData updatePoll updatePollOption 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.

isCategoryFilterEnabled: boolean

Weather the category filter is enabled or not.

isEphemeral: boolean = false

Whether the channel is ephemeral.

isFrozen: boolean = false

Whether the channel is frozen.

isTemplateLabelEnabled: boolean

Weather the template label is enabled or not.

lastMessage: null | NotificationMessage

The last message of the channel.

notificationCategories: NotificationCategory[]

The list of notification categories.

pinnedMessageIds: number[] = []

The pinned message IDs of the channel.

Accessors

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

    Returns object

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

    Returns number

  • get memberCount(): number
  • The total member count for this channel.

    Returns number

  • get members(): Member[]
  • Member list for this channel.

    Returns Member[]

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

    Returns number

  • get myLastRead(): number
  • Current user's last read receipt timestamp in channel.

    Returns number

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

    Returns string

  • set name(value): void
  • The topic or name of the channel.

    Parameters

    • value: string

    Returns void

  • get unreadMessageCount(): number
  • The unread message count for this channel for the currentUser.

    Returns number

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

    Returns string

Methods

  • Parameters

    • userIds: string[]

    Returns Promise<void>

    Add operators to the channel.

  • Parameters

    • pollId: number
    • optionText: string

    Returns Promise<Poll>

    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
    • Optionalduration: number
    • Optionaldescription: string

    Returns Promise<void>

    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
    • Optionalduration: number
    • Optionaldescription: string

    Returns Promise<void>

    Bans a member with userId.

  • Parameters

    • pollId: number

    Returns Promise<Poll>

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

  • Parameters

    • key: string

    Returns Promise<void>

    Deletes a meta counter.

  • Parameters

    • key: string

    Returns Promise<void>

    Deletes a meta data.

  • Parameters

    • pollId: number

    Returns Promise<void>

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

  • Parameters

    • pollId: number
    • pollOptionId: number

    Returns Promise<void>

    Deletes this poll option.

  • Returns Promise<void>

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

  • Parameters

    Returns boolean

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

  • Parameters

    Returns boolean

    Whether the given channel is identical to this channel.

  • Parameters

    Returns Promise<void>

    messages

    Logging clicked for statisics.

  • Parameters

    Returns Promise<boolean>

    Logging custom stat for statistics.

  • Parameters

    Returns Promise<boolean>

    since v4.12.0. Use logViewed instead.

  • Parameters

    Returns Promise<boolean>

    Logging viewed for statistics. Limitation: IMPRESSION_LOG_LIMIT messages at once.

  • Parameters

    Returns Promise<void>

    since v4.12.0. Use logClicked instead.

  • Parameters

    Returns Promise<void>

    Sends mark as read for given messages. If the messages are not given, all the messages would get marked as read.

  • Parameters

    • user: User
    • Optionalduration: number
    • Optionaldescription: string

    Returns Promise<void>

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

  • Parameters

    • userId: string
    • Optionalduration: number
    • Optionaldescription: string

    Returns Promise<void>

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

  • Parameters

    • messageId: number

    Returns Promise<void>

    Pins a message to the channel.

  • Returns Promise<FeedChannel>

    Refreshes all the data of this channel.

  • Parameters

    • userIds: string[]

    Returns Promise<void>

    Remove operators from the channel.

  • Parameters

    Returns Promise<void>

    Reports this channel of inappropriate activities.

  • Parameters

    Returns Promise<void>

    Reports a user of suspicious activities.

  • Parameters

    Returns Promise<void>

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

  • Returns Promise<void>

    Unfreezes the channel.

  • Parameters

    Returns Promise<void>

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

  • Parameters

    • userId: string

    Returns Promise<void>

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

  • Parameters

    • messageId: number

    Returns Promise<void>

    Removes the message from the channel's pinned messages.

  • Parameters

    Returns Promise<FileMessage>

    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>

    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>

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

  • Parameters

    • pollId: number
    • pollOptionIds: number[]

    Returns Promise<PollVoteEvent>

    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.