FeedChannel

Represents a feed channel.

Since

4.6.0

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

All locally cached metadata as a map. Cached metadata is updated under following circumstances:

Link copied to clipboard
Link copied to clipboard

The cover image URL.

Link copied to clipboard
open override var createdAt: Long

The creation time of the channel in milliseconds.

Link copied to clipboard

The channel data.

Link copied to clipboard

Weather the category filter is enabled or not.

Link copied to clipboard

Whether the channel is ephemeral.

Link copied to clipboard

Whether the instance is FeedChannel type.

Link copied to clipboard

Whether the channel is frozen.

Link copied to clipboard

Whether the instance is GroupChannel type.

Link copied to clipboard

Whether the instance is OpenChannel type.

Link copied to clipboard

Weather the template label is enabled or not.

Link copied to clipboard

The last message of the channel.

Link copied to clipboard

The last message among channel's pinned messages.

Link copied to clipboard

The total member count for this channel.

Link copied to clipboard

Member list for this channel.

Link copied to clipboard

The local timestamp of when this channel has been used in a MessageCollection.

Link copied to clipboard

Current user's last read receipt timestamp in channel.

Link copied to clipboard

My member state.

Link copied to clipboard
open override var name: String

The topic or name of the channel.

Link copied to clipboard

The list of notification categories.

Link copied to clipboard

The pinned message ids of the channel.

Link copied to clipboard

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

Link copied to clipboard
open override var url: String

The unique channel URL.

Functions

Link copied to clipboard

Adds message meta array values.

Link copied to clipboard

Add operators to the channel. See [

Link copied to clipboard
fun addPollOption(pollId: Long, optionText: String, handler: PollHandler?)

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

Link copied to clipboard
fun addReaction(message: BaseMessage, key: String, handler: ReactionHandler?)

Adds Reaction.

Link copied to clipboard

Cancels an ongoing FileMessage upload.

Link copied to clipboard
Link copied to clipboard
fun closePoll(pollId: Long, handler: PollHandler?)

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

Link copied to clipboard
fun copyFileMessage(targetChannel: BaseChannel, fileMessage: FileMessage, handler: FileMessageHandler?): FileMessage?

Copies a file message from this channel to the target channel.

Link copied to clipboard
fun copyUserMessage(targetChannel: BaseChannel, userMessage: UserMessage, handler: UserMessageHandler?): UserMessage?

Copies a user message from this channel to the target channel.

Link copied to clipboard

Creates a query instance to get the banned user list from this channel.

Link copied to clipboard
fun createMessageMetaArrayKeys(message: BaseMessage, metaArrayKeys: List<String>, handler: BaseMessageHandler?)

Creates message meta array keys.

Link copied to clipboard
fun createMetaCounters(metaCounterMap: Map<String, Int>, handler: MetaCounterHandler?)

Creates meta counters. This can be used to customize the channel.

Link copied to clipboard
fun createMetaData(metaDataMap: Map<String, String>, handler: MetaDataHandler?)

Creates meta data. This can be used to customize the channel.

Link copied to clipboard
fun createMutedUserListQuery(limit: Int = QUERY_DEFAULT_LIMIT): MutedUserListQuery

Creates a query instance to get the muted user (online and offline both) list of this channel.

Link copied to clipboard
fun createNotificationCollection(messageListParams: MessageListParams, startingPoint: Long = Long.MAX_VALUE, messageCollectionHandler: NotificationCollectionHandler? = null): NotificationCollection

Creates NotificationCollection instance for this channel.

Link copied to clipboard
fun createOperatorListQuery(limit: Int = QUERY_DEFAULT_LIMIT): OperatorListQuery

Creates a query instance to get the operator list from this channel.

Link copied to clipboard
fun createPollListQuery(limit: Int = QUERY_DEFAULT_LIMIT): PollListQuery

Creates a query instance to get the poll list from this channel.

Link copied to clipboard
fun createPollVoterListQuery(pollId: Long, pollOptionId: Long, limit: Int = QUERY_DEFAULT_LIMIT): PollVoterListQuery

Creates a query instance to get the voters of a poll option.

Link copied to clipboard

Creates previous message list query for this channel.

Link copied to clipboard
fun decreaseMetaCounters(metaCounterMap: Map<String, Int>, handler: MetaCounterHandler?)

Decreases meta counters. This decreases atomically the keyed meta counter by the specified value.

Link copied to clipboard

Deletes all meta counters.

Link copied to clipboard

Deletes all meta data.

Link copied to clipboard

Deletes a message.

fun deleteMessage(messageId: Long, handler: CompletionHandler?)

Deletes a message with message ID. To delete message in OpenChannel with ephemeral mode, use deleteMessage with BaseMessage object instead.

Link copied to clipboard
fun deleteMessageMetaArrayKeys(message: BaseMessage, metaArrayKeys: List<String>, handler: BaseMessageHandler?)

Deletes message meta array keys.

Link copied to clipboard

Deletes a meta counter.

Link copied to clipboard

Deletes a meta data.

Link copied to clipboard
fun deletePoll(pollId: Long, handler: CompletionHandler?)

Deletes this poll. Once deleted successfully, a null will be passed to the handler as the error.

Link copied to clipboard
fun deletePollOption(pollId: Long, pollOptionId: Long, handler: CompletionHandler?)

Deletes this poll option. Once deleted successfully, a null will be passed to the handler as error.

Link copied to clipboard
fun deleteReaction(message: BaseMessage, key: String, handler: ReactionHandler?)

Deletes Reaction.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard

Get all meta counters.

Link copied to clipboard

Gets all meta data.

Link copied to clipboard

Requests message change logs after given timestamp. The result is passed to handler.

Link copied to clipboard

Requests message change logs after given token. The result is passed to handler.

Link copied to clipboard

Retrieves previous or next messages based on the message ID in a specific channel. The result is passed to handler as list.

Link copied to clipboard

Retrieves previous or next messages based on the timestamp in a specific channel. The result is passed to handler as list.

Link copied to clipboard

Gets meta counters.

Link copied to clipboard

Gets meta data.

Link copied to clipboard

Gets my muted information in this channel.

Link copied to clipboard

Requests poll change logs after given timestamp. The result is passed to handler.

Link copied to clipboard

Requests poll change logs after given token. The result is passed to handler.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun increaseMetaCounters(metaCounterMap: Map<String, Int>, handler: MetaCounterHandler?)

Increases meta counters. This increases atomically the keyed meta counter by the specified value.

Link copied to clipboard

Logging clicked message stat for statistics.

Link copied to clipboard
fun logCustom(topic: String, messages: List<BaseMessage>): Boolean

Logging custom stat for statistics.

Link copied to clipboard

Logging impression for statistics. Limitation: LOG_VIEWED_LIMIT messages at once.

Link copied to clipboard

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

Link copied to clipboard

Sends mark as read to this channel with a CompletionHandler.

fun markAsRead(messages: List<BaseMessage>, handler: CompletionHandler?)

Sends mark as read given messages with a CompletionHandler. Only FeedChannel messages are allowed.

Link copied to clipboard
open fun pinMessage(messageId: Long, handler: CompletionHandler?)

Pins a message to the channel.

Link copied to clipboard
fun refresh(handler: CompletionHandler?)

Refreshes all the data of this channel.

Link copied to clipboard

Remove all operators from the channel. See https://docs.sendbird.com/platform/user_type#3_operator for the explanations on the operators.

Link copied to clipboard

Removes message meta array values.

Link copied to clipboard

Remove operators from the channel. See [

Link copied to clipboard
fun report(reportCategory: ReportCategory, reportDescription: String?, handler: CompletionHandler?)

Reports this channel of inappropriate activities.

Link copied to clipboard
fun reportMessage(message: BaseMessage, reportCategory: ReportCategory, reportDescription: String?, handler: CompletionHandler?)

Reports a malicious message.

Link copied to clipboard
fun reportUser(offendingUser: User, reportCategory: ReportCategory, reportDescription: String?, handler: CompletionHandler?)

Reports a user of suspicious activities.

Link copied to clipboard
fun resendFileMessage(fileMessage: FileMessage, file: File?, handler: FileMessageHandler?)

Resends a file with given file information.

Resends a file with given file information and gets callback for uploading progress.

Link copied to clipboard

Resends a file message. File information is used from the failed message.

Resends a failed user message.

fun resendMessage(fileMessage: FileMessage, file: File?, handler: FileMessageHandler?): FileMessage?

Resends a file with given file information.

Resends a file with given file information and gets callback for uploading progress.

Link copied to clipboard
fun resendUserMessage(userMessage: UserMessage, handler: UserMessageHandler?)

Resends a failed user message.

Link copied to clipboard

Sends a file with given file information.

Sends a file with given file information and gets callback for uploading progress.

Link copied to clipboard

Sends files with given files information. The maximum number of files is 20.

Sends files with given files information and gets callback for uploading progress. The maximum number of files is 20. This method handles FileMessageCreateParams only which have set binary file not URL.

Link copied to clipboard

Sends a user message.

Link copied to clipboard

Serializes the GroupChannel or OpenChannel instance. This byte array can be stored in the database in your application. The instance can be restored by buildFromSerializedData.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun translateUserMessage(userMessage: UserMessage, targetLanguages: List<String>, handler: UserMessageHandler?)

Translates a user message.

Link copied to clipboard
open fun unpinMessage(messageId: Long, handler: CompletionHandler?)

Removes the message from the channel's pinned messages.

Link copied to clipboard

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.

Link copied to clipboard
fun updateMetaCounters(metaCounterMap: Map<String, Int>, handler: MetaCounterHandler?)

Updates meta counters.

Link copied to clipboard
fun updateMetaData(metaDataMap: Map<String, String>, handler: MetaDataHandler?)

Updates meta data.

Link copied to clipboard
fun updatePoll(pollId: Long, params: PollUpdateParams, handler: PollHandler?)

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

Link copied to clipboard
fun updatePollOption(pollId: Long, pollOptionId: Long, optionText: String, handler: PollHandler?)

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

Link copied to clipboard

Updates a UserMessage that was previously sent in the channel.

Link copied to clipboard
fun votePoll(pollId: Long, pollOptionIds: List<Long>, handler: PollVoteEventHandler?)

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.