Pins

interface Pins

This module provides methods for managing pinned messages in conversations.

Pinned messages highlight important information within a conversation, allowing all participants to easily reference key messages. Users can pin or unpin messages, and retrieve a list of all pinned messages within a conversation.

Pinned messages are shared among all users in a conversation, meaning any participant can see or interact with them.

Each pin is represented by a PinMessage object, which encapsulates all relevant data.

Samples

com.ale.rainbowsdk.samples.PinsSample

Types

Link copied to clipboard

Interface defining callbacks for handling events related to pin changes in conversations.

Functions

Link copied to clipboard
abstract suspend fun getPinnedMessagesInConversation(conversation: IRainbowConversation): RainbowResult<List<PinMessage>>

Retrieves all pinned messages in a conversation.

Link copied to clipboard
abstract suspend fun pinMessageInConversation(conversation: IRainbowConversation, message: IMMessage): RainbowResult<PinMessage>

Pins a message in a conversation.

Link copied to clipboard
abstract fun registerChangeListener(pinsChangeListener: Pins.PinsChangeListener)

Registers a listener to monitor pin changes in conversations.

Link copied to clipboard
abstract suspend fun unpinMessageInConversation(conversation: IRainbowConversation, message: IMMessage): RainbowResult<Unit>

Unpins a previously pinned message from a conversation.

Link copied to clipboard
abstract fun unregisterChangeListener(pinsChangeListener: Pins.PinsChangeListener)

Unregisters a previously registered listener for pin changes in conversations.