Package-level declarations

Functions

Link copied to clipboard
suspend fun GroupChannel.acceptInvitation(accessCode: String? = null)

Accepts the invitation sent to the current User. After the acceptance, the User will be joined to this GroupChannel.

Link copied to clipboard
suspend fun BaseChannel.addMessageMetaArrayValues(message: BaseMessage, metaArrays: List<MessageMetaArray>): BaseMessage
fun BaseChannel.addMessageMetaArrayValues(message: BaseMessage, metaArrays: List<MessageMetaArray>, handler: ResultHandler<BaseMessage>?)

Add message meta array values

Link copied to clipboard
suspend fun BaseChannel.addOperators(userIds: Collection<String>)

Add operators

Link copied to clipboard
suspend fun BaseChannel.addPollOption(pollId: Long, optionText: String): Poll

Add poll option

fun BaseChannel.addPollOption(pollId: Long, optionText: String, handler: ResultHandler<Poll>?)

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

Link copied to clipboard
suspend fun BaseChannel.addReaction(message: BaseMessage, key: String): ReactionEvent
fun BaseChannel.addReaction(message: BaseMessage, key: String, handler: ResultHandler<ReactionEvent>?)

Add reaction

Link copied to clipboard
suspend fun OpenChannel.banUser(userId: String, seconds: Int)

Bans a participant. Operators can ban participants from this channel. Banned participant 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.

suspend fun GroupChannel.banUser(userId: String, description: String?, seconds: Int)

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.

Link copied to clipboard
suspend fun GroupChannel.cancelScheduledMessage(scheduledMessageId: Long)

Cancels a scheduled message with scheduledMessageId.

Link copied to clipboard
suspend fun BaseChannel.closePoll(pollId: Long): Poll
fun BaseChannel.closePoll(pollId: Long, handler: ResultHandler<Poll>?)

Close poll

Link copied to clipboard
fun BaseChannel.copyFileMessage(targetChannel: BaseChannel, fileMessage: FileMessage): Flow<MessageResult<FileMessage>>

Copy file message

Link copied to clipboard
fun GroupChannel.copyMultipleFilesMessage(targetChannel: BaseChannel, multipleFilesMessage: MultipleFilesMessage): Flow<MessageResult<MultipleFilesMessage>>

Copy multiple files message

Link copied to clipboard
fun BaseChannel.copyUserMessage(targetChannel: BaseChannel, userMessage: UserMessage): Flow<MessageResult<UserMessage>>

Copies a user message from this channel to the target channel. ** Sample code **

Link copied to clipboard
suspend fun GroupChannel.Companion.createChannel(params: GroupChannelCreateParams): GroupChannel
fun GroupChannel.Companion.createChannel(params: GroupChannelCreateParams, handler: ResultHandler<GroupChannel>?)

Creates GroupChannel with GroupChannelCreateParams.

suspend fun OpenChannel.Companion.createChannel(params: OpenChannelCreateParams): OpenChannel
fun OpenChannel.Companion.createChannel(params: OpenChannelCreateParams, handler: ResultHandler<OpenChannel>)

Creates new OpenChannel with OpenChannelParams.

Link copied to clipboard
suspend fun GroupChannel.Companion.createDistinctChannelIfNotExist(params: GroupChannelCreateParams): CreateDistinctChannelResult
fun GroupChannel.Companion.createDistinctChannelIfNotExist(params: GroupChannelCreateParams, handler: ResultHandler<CreateDistinctChannelResult>?)

Create distinct channel if not exist

Link copied to clipboard
suspend fun BaseChannel.createMessageMetaArrayKeys(message: BaseMessage, metaArrayKeys: List<String>): BaseMessage
fun BaseChannel.createMessageMetaArrayKeys(message: BaseMessage, metaArrayKeys: List<String>, handler: ResultHandler<BaseMessage>?)

Create message meta array keys

Link copied to clipboard
suspend fun BaseChannel.createMetaCounters(metaCounterMap: Map<String, Int>): Map<String, Int>
fun BaseChannel.createMetaCounters(metaCounterMap: Map<String, Int>, handler: ResultHandler<Map<String, Int>>?)

Create meta counters

Link copied to clipboard
suspend fun BaseChannel.createMetaData(metaDataMap: Map<String, String>): Map<String, String>

Create meta data

fun BaseChannel.createMetaData(metaDataMap: Map<String, String>, handler: ResultHandler<Map<String, String>>?)

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

Link copied to clipboard
fun GroupChannel.createScheduledFileMessage(scheduledFileMessageCreateParams: ScheduledFileMessageCreateParams): Flow<ScheduledMessageResult<FileMessage>>
fun GroupChannel.createScheduledFileMessage(scheduledFileMessageCreateParams: ScheduledFileMessageCreateParams, handler: ResultHandler<FileMessage>?): FileMessage?

Create scheduled file message

Link copied to clipboard
fun GroupChannel.createScheduledUserMessage(scheduledUserMessageCreateParams: ScheduledUserMessageCreateParams): Flow<ScheduledMessageResult<UserMessage>>
fun GroupChannel.createScheduledUserMessage(scheduledUserMessageCreateParams: ScheduledUserMessageCreateParams, handler: ResultHandler<UserMessage>?): UserMessage

Create scheduled user message

Link copied to clipboard
suspend fun GroupChannel.declineInvitation()

Declines the invitation sent to the current User.

Link copied to clipboard
suspend fun BaseChannel.decreaseMetaCounters(metaCounterMap: Map<String, Int>): Map<String, Int>
fun BaseChannel.decreaseMetaCounters(metaCounterMap: Map<String, Int>, handler: ResultHandler<Map<String, Int>>?)

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

Link copied to clipboard
suspend fun GroupChannel.delete()

Deletes this GroupChannel. Note that only operators of a channel are able to delete it or else, an error will be returned to the handler.

suspend fun OpenChannel.delete()

Deletes an OpenChannel. Note that only operators of a channel are able to delete it or else, an error will be returned to the handler.

Link copied to clipboard
suspend fun BaseChannel.deleteAllMetaCounters()

Delete all meta counters

Link copied to clipboard
suspend fun BaseChannel.deleteAllMetaData()

Delete all meta data

Link copied to clipboard
suspend fun BaseChannel.deleteMessage(messageId: Long)

Delete message

Link copied to clipboard
suspend fun BaseChannel.deleteMessageMetaArrayKeys(message: BaseMessage, metaArrayKeys: List<String>): BaseMessage
fun BaseChannel.deleteMessageMetaArrayKeys(message: BaseMessage, metaArrayKeys: List<String>, handler: ResultHandler<BaseMessage>?)

Delete message meta array keys

Link copied to clipboard
suspend fun BaseChannel.deleteMetaCounter(key: String)

Delete meta counter

Link copied to clipboard
suspend fun BaseChannel.deleteMetaData(key: String)

Delete meta data

Link copied to clipboard
suspend fun BaseChannel.deletePoll(pollId: Long)

Delete poll

Link copied to clipboard
suspend fun BaseChannel.deletePollOption(pollId: Long, pollOptionId: Long)

Deletes this poll option.

Link copied to clipboard
suspend fun BaseChannel.deleteReaction(message: BaseMessage, key: String): ReactionEvent
fun BaseChannel.deleteReaction(message: BaseMessage, key: String, handler: ResultHandler<ReactionEvent>?)

Delete reaction

Link copied to clipboard
suspend fun OpenChannel.enter()

Enters this channel. This method is asynchronous.

Link copied to clipboard
suspend fun OpenChannel.exit()

Exits this channel. This method is asynchronous.

Link copied to clipboard
suspend fun GroupChannel.freeze()

Freeze this GroupChannel.

Link copied to clipboard
suspend fun BaseChannel.getAllMetaCounters(): Map<String, Int>
fun BaseChannel.getAllMetaCounters(handler: ResultHandler<Map<String, Int>>?)

Get all meta counters

Link copied to clipboard
suspend fun BaseChannel.getAllMetaData(): Map<String, String>
fun BaseChannel.getAllMetaData(handler: ResultHandler<Map<String, String>>?)

Get all meta data

Link copied to clipboard
suspend fun FeedChannel.Companion.getChannel(channelUrl: String): FeedChannel
fun FeedChannel.Companion.getChannel(channelUrl: String, handler: ResultHandler<FeedChannel>)

Gets a FeedChannel with given channel URL.

suspend fun GroupChannel.Companion.getChannel(channelUrl: String): GroupChannel
fun GroupChannel.Companion.getChannel(channelUrl: String, handler: ResultHandler<GroupChannel>?)

Gets a GroupChannel with given channel URL.

suspend fun OpenChannel.Companion.getChannel(channelUrl: String): OpenChannel
fun OpenChannel.Companion.getChannel(channelUrl: String, handler: ResultHandler<OpenChannel>)

Gets a OpenChannel with given channel URL.

Link copied to clipboard
suspend fun BaseChannel.getMessageChangeLogsSinceTimestamp(ts: Long, params: MessageChangeLogsParams = MessageChangeLogsParams()): MessageChangeLogsResult
fun BaseChannel.getMessageChangeLogsSinceTimestamp(ts: Long, params: MessageChangeLogsParams = MessageChangeLogsParams(), handler: ResultHandler<MessageChangeLogsResult>?)

Get message change logs since timestamp

Link copied to clipboard
suspend fun BaseChannel.getMessageChangeLogsSinceToken(token: String?, params: MessageChangeLogsParams = MessageChangeLogsParams()): MessageChangeLogsResult

Get message change logs since token

fun BaseChannel.getMessageChangeLogsSinceToken(token: String?, params: MessageChangeLogsParams = MessageChangeLogsParams(), handler: ResultHandler<MessageChangeLogsResult>?)

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

Link copied to clipboard
suspend fun BaseChannel.getMessagesByMessageId(messageId: Long, params: MessageListParams): List<BaseMessage>

Get messages by message id

fun BaseChannel.getMessagesByMessageId(messageId: Long, params: MessageListParams, handler: ResultHandler<List<BaseMessage>>?)

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
suspend fun BaseChannel.getMessagesByTimestamp(ts: Long, params: MessageListParams): List<BaseMessage>

Get messages by timestamp

fun BaseChannel.getMessagesByTimestamp(ts: Long, params: MessageListParams, handler: ResultHandler<List<BaseMessage>>?)

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
suspend fun BaseChannel.getMetaCounters(keys: Collection<String>): Map<String, Int>
fun BaseChannel.getMetaCounters(keys: Collection<String>, handler: ResultHandler<Map<String, Int>>?)

Get meta counters

Link copied to clipboard
suspend fun BaseChannel.getMetaData(keys: Collection<String>): Map<String, String>
fun BaseChannel.getMetaData(keys: Collection<String>, handler: ResultHandler<Map<String, String>>?)

Get meta data

Link copied to clipboard
suspend fun BaseChannel.getMyMutedInfo(): MyMutedInfoResult
fun BaseChannel.getMyMutedInfo(handler: ResultHandler<MyMutedInfoResult>?)

Get my muted info

Link copied to clipboard
suspend fun GroupChannel.getMyPushTriggerOption(): GroupChannel.PushTriggerOption
fun GroupChannel.getMyPushTriggerOption(handler: ResultHandler<GroupChannel.PushTriggerOption>?)

Get my push trigger option

Link copied to clipboard

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

Link copied to clipboard
suspend fun BaseChannel.getPollChangeLogsSinceToken(token: String?): PollChangeLogsResult

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

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

Link copied to clipboard
suspend fun GroupChannel.hide(hidePreviousMessages: Boolean = false, allowAutoUnhide: Boolean = true)

Hides this channel from the current User's GroupChannel list. When a new message is received from the channel, it appears again.

Link copied to clipboard
suspend fun BaseChannel.increaseMetaCounters(metaCounterMap: Map<String, Int>): Map<String, Int>
fun BaseChannel.increaseMetaCounters(metaCounterMap: Map<String, Int>, handler: ResultHandler<Map<String, Int>>?)

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

Link copied to clipboard
suspend fun GroupChannel.invite(userIds: List<String>)

Invites Users top this channel.

Link copied to clipboard
suspend fun GroupChannel.join(accessCode: String? = null)

Joins this channel if this channel is public.

Link copied to clipboard
suspend fun GroupChannel.leave(shouldRemoveOperatorStatus: Boolean = false)

Leaves this channel.

Link copied to clipboard
suspend fun FeedChannel.markAsRead()

Sends mark as read to this channel with a CompletionHandler.

suspend fun GroupChannel.markAsRead()

Sends mark as read to this channel

suspend fun FeedChannel.markAsRead(messages: List<BaseMessage>)

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

Link copied to clipboard
suspend fun GroupChannel.muteUser(userId: String, description: String? = null, seconds: Int = -1)
suspend fun OpenChannel.muteUser(userId: String, description: String? = null, seconds: Int = -1)

Mutes User. Muted User's messages are no longer delivered to current User.

Link copied to clipboard
suspend fun GroupChannel.pinMessage(messageId: Long)

Pins a message to the channel.

Link copied to clipboard
suspend fun FeedChannel.refresh()
suspend fun GroupChannel.refresh()
suspend fun OpenChannel.refresh()

Refreshes all the data of this channel.

Link copied to clipboard
suspend fun BaseChannel.removeAllOperators()

Remove all operators

Link copied to clipboard
suspend fun BaseChannel.removeMessageMetaArrayValues(message: BaseMessage, metaArrays: List<MessageMetaArray>): BaseMessage
fun BaseChannel.removeMessageMetaArrayValues(message: BaseMessage, metaArrays: List<MessageMetaArray>, handler: ResultHandler<BaseMessage>?)

Remove message meta array values

Link copied to clipboard
suspend fun BaseChannel.removeOperators(userIds: Collection<String>)

Remove operators from the channel. See [

Link copied to clipboard
suspend fun BaseChannel.report(reportCategory: ReportCategory, reportDescription: String?)

Reports this channel of inappropriate activities.

Link copied to clipboard
suspend fun BaseChannel.reportMessage(message: BaseMessage, reportCategory: ReportCategory, reportDescription: String?)

Reports a malicious message.

Link copied to clipboard
suspend fun BaseChannel.reportUser(offendingUser: User, reportCategory: ReportCategory, reportDescription: String?)

Reports a user of suspicious activities.

Link copied to clipboard
fun BaseChannel.resendMessage(message: UserMessage): Flow<MessageResult<UserMessage>>

Resends a failed user message.

fun GroupChannel.resendMessage(multipleFilesMessage: MultipleFilesMessage): Flow<MultipleFilesMessageResult>

Resends multiple files or file URLs as a single MultipleFilesMessage.

fun BaseChannel.resendMessage(fileMessage: FileMessage, file: File?): Flow<MessageResult<FileMessage>>

Resend message

Link copied to clipboard
fun BaseChannel.resendMessageWithProgress(fileMessage: FileMessage, file: File?): Flow<ProgressMessageResult<FileMessage>>

Resend message with progress.

Link copied to clipboard
suspend fun GroupChannel.resetMyHistory()

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

Link copied to clipboard
fun BaseChannel.sendFileMessage(params: FileMessageCreateParams): Flow<MessageResult<FileMessage>>

Sends a file with given file information.

Link copied to clipboard
fun BaseChannel.sendFileMessages(paramsList: List<FileMessageCreateParams>): Flow<MultipleMessagesResult<FileMessage>>

Send file messages

Link copied to clipboard
fun BaseChannel.sendFileMessagesWithProgress(paramsList: List<FileMessageCreateParams>): Flow<ProgressMultipleMessagesResult<FileMessage>>

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
fun BaseChannel.sendFileMessageWithProgress(params: FileMessageCreateParams): Flow<ProgressMessageResult<FileMessage>>

Sends a file with given file information.

Link copied to clipboard
fun GroupChannel.sendMultipleFilesMessage(params: MultipleFilesMessageCreateParams): Flow<MultipleFilesMessageResult>

This is a function that sends multiple files or file URLs as a single MultipleFilesMessage.

Link copied to clipboard
suspend fun GroupChannel.sendScheduledMessageNow(scheduledMessageId: Long)

Send scheduled message now

Link copied to clipboard
fun BaseChannel.sendUserMessage(params: UserMessageCreateParams): Flow<MessageResult<UserMessage>>

Send user message ** Sample code **

fun BaseChannel.sendUserMessage(message: String): Flow<MessageResult<UserMessage>>

Send user message

Link copied to clipboard
suspend fun GroupChannel.setMyCountPreference(preference: CountPreference)

Sets my count preference for this channel.

Link copied to clipboard
suspend fun GroupChannel.setMyPushTriggerOption(pushTriggerOption: GroupChannel.PushTriggerOption)

Sets push trigger option of this channel. If channel's push trigger option is set to GroupChannel.PushTriggerOption.DEFAULT, it works according to the state of SendbirdChat.PushTriggerOption. If not, push messages will be triggered according to the state of GroupChannel.PushTriggerOption.

Link copied to clipboard
suspend fun BaseChannel.translateUserMessage(userMessage: UserMessage, targetLanguages: List<String>): UserMessage

Translate user message

fun BaseChannel.translateUserMessage(userMessage: UserMessage, targetLanguages: List<String>, handler: ResultHandler<UserMessage>?)

Translates a user message.

Link copied to clipboard
suspend fun GroupChannel.unbanUser(userId: String)
suspend fun OpenChannel.unbanUser(userId: String)

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

Link copied to clipboard
suspend fun GroupChannel.unfreeze()

Unfreeze this GroupChannel.

Link copied to clipboard
suspend fun GroupChannel.unhide()

Unhides this channel from the current User's GroupChannel list.

Link copied to clipboard
suspend fun GroupChannel.unmuteUser(userId: String)

Unmutes User. Unmuted User's messages are again shown to current User.

suspend fun OpenChannel.unmuteUser(userId: String)

Unmute userUnmutes User. Unmuted User's messages are again shown to current User.

Link copied to clipboard
suspend fun GroupChannel.unpinMessage(messageId: Long)

Removes the message from the channel's pinned messages.

Link copied to clipboard
suspend fun GroupChannel.updateChannel(params: GroupChannelUpdateParams): GroupChannel

Update this channel with GroupChannelUpdateParams.

suspend fun OpenChannel.updateChannel(params: OpenChannelUpdateParams): OpenChannel
fun OpenChannel.updateChannel(params: OpenChannelUpdateParams, handler: ResultHandler<OpenChannel>)

Update this channel with OpenChannelParams.

fun GroupChannel.updateChannel(params: GroupChannelUpdateParams, handler: ResultHandler<GroupChannel>?)

Update this channel with GroupChannelUpdateParams.

Link copied to clipboard
suspend fun BaseChannel.updateFileMessage(messageId: Long, params: FileMessageUpdateParams): FileMessage

Update file message

fun BaseChannel.updateFileMessage(messageId: Long, params: FileMessageUpdateParams, handler: ResultHandler<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.

Link copied to clipboard
suspend fun BaseChannel.updateMetaCounters(metaCounterMap: Map<String, Int>): Map<String, Int>
fun BaseChannel.updateMetaCounters(metaCounterMap: Map<String, Int>, handler: ResultHandler<Map<String, Int>>?)

Update meta counters

Link copied to clipboard
suspend fun BaseChannel.updateMetaData(metaDataMap: Map<String, String>): Map<String, String>

Update meta data

fun BaseChannel.updateMetaData(metaDataMap: Map<String, String>, handler: ResultHandler<Map<String, String>>?)

Updates meta data.

Link copied to clipboard
suspend fun BaseChannel.updatePoll(pollId: Long, params: PollUpdateParams): Poll
fun BaseChannel.updatePoll(pollId: Long, params: PollUpdateParams, handler: ResultHandler<Poll>?)

Update poll

Link copied to clipboard
suspend fun BaseChannel.updatePollOption(pollId: Long, pollOptionId: Long, optionText: String): Poll

Updates optionText fields of this poll option. A non-null PollOption instance will be returned once updated successfully

fun BaseChannel.updatePollOption(pollId: Long, pollOptionId: Long, optionText: String, handler: ResultHandler<Poll>?)

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
suspend fun GroupChannel.updateScheduledFileMessage(scheduledMessageId: Long, scheduledFileMessageUpdateParams: ScheduledFileMessageUpdateParams): FileMessage

Update a scheduled file message with scheduledMessageId and ScheduledFileMessageUpdateParams.

fun GroupChannel.updateScheduledFileMessage(scheduledMessageId: Long, scheduledFileMessageUpdateParams: ScheduledFileMessageUpdateParams, handler: ResultHandler<FileMessage>?)

Update a scheduled file message with scheduledMessageId and ScheduledFileMessageUpdateParams.

Link copied to clipboard
suspend fun GroupChannel.updateScheduledUserMessage(scheduledMessageId: Long, scheduledUserMessageUpdateParams: ScheduledUserMessageUpdateParams): UserMessage

Update a scheduled user message with scheduledMessageId and ScheduledUserMessageUpdateParams.

fun GroupChannel.updateScheduledUserMessage(scheduledMessageId: Long, scheduledUserMessageUpdateParams: ScheduledUserMessageUpdateParams, handler: ResultHandler<UserMessage>?)

Update scheduled user message

Link copied to clipboard
suspend fun BaseChannel.updateUserMessage(messageId: Long, params: UserMessageUpdateParams): UserMessage
fun BaseChannel.updateUserMessage(messageId: Long, params: UserMessageUpdateParams, handler: ResultHandler<UserMessage>?)

Updates a UserMessage that was previously sent in the channel.

Link copied to clipboard
suspend fun BaseChannel.votePoll(pollId: Long, pollOptionIds: List<Long>): PollVoteEvent
fun BaseChannel.votePoll(pollId: Long, pollOptionIds: List<Long>, handler: ResultHandler<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.