Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sceyt/sceyt-chat-android-uikit/llms.txt
Use this file to discover all available pages before exploring further.
MessageInteractor is the primary interface for all message-level operations in the Sceyt Chat Android UIKit. It is accessible via SceytChatUIKit.chatUIFacade.messageInteractor. Nearly all methods are suspend functions. Paginated loading methods return Flow<PaginationResponse<SceytMessage>>, which emits a database result first and then updates from the server. One-shot operations return SceytResponse<T> — a sealed class with Success and Error variants. Thread replies are supported throughout by passing replyInThread = true and using the parent message ID as the conversationId.
Package: com.sceyt.chatuikit.persistence.interactor
Loading Messages
Loads messages older than
lastMessageId (backwards pagination). Emits cached messages immediately, then emits the server response once available.Loads messages newer than
lastMessageId (forward pagination). Use this to scroll towards newer messages when the user is not at the bottom of the conversation.Loads messages surrounding a specific
messageId — useful for scrolling to a search result or a mention deep inside the history. Fetches both older and newer messages around the anchor.Loads the most recent messages in a conversation. Use this as the initial load when opening a channel.
Searching Messages
Performs a full-text search in a conversation. Returns the first page of matching messages. Call
loadNextSearchMessages() to paginate through additional results.Loads the next page of results from the most recent
searchMessages call. Must be called after searchMessages has returned successfully.Unread Mentions
Returns a page of message IDs where the current user has been mentioned and has not yet read, relative to
messageId in the specified direction.Fetching Messages by ID
Fetches a specific set of messages from the server by their IDs.
Fetches a single message from the server by its ID and persists it locally.
Returns a single message from the local database by its server-assigned ID, or
null if not found.Returns a single message from the local database by its client-side transaction ID (tid), or
null if not found.Syncing Messages
Fetches all messages sent after
messageId from the server and persists them locally. Useful for catching up after an extended offline period.Synchronises a window of messages around a specific
messageId from the server. Returns a SyncNearMessagesResult with the refreshed message set.Sending Messages
Sends a message and returns a
Flow that emits SendMessageResult events tracking the send lifecycle (pending → uploading attachments → sent). Prefer this over sendMessage when you need progress updates.Fires a message send without returning a flow result. Use for fire-and-forget sending when you don’t need per-message progress feedback.
Sends multiple messages in sequence to a channel. Each message is persisted locally first.
Sends a message that originated from the Android share sheet (external file share). Handles the shared file’s upload lifecycle.
Forwards one or more existing messages to a channel. The forwarded messages are sent as new messages preserving the original sender attribution.
Sends a message whose attachments have already been uploaded (i.e. the attachment
url is already populated). Use this when you manage uploads externally.Pending Messages
Retries sending all pending (failed or queued) messages for a specific channel.
Retries sending all pending messages across every channel. Called automatically after reconnection.
Flushes all queued read/delivery/played markers that could not be sent while offline.
Syncs all pending message state changes (edits, deletes) that were queued during an offline period.
Sends all queued reaction add/remove operations that could not be delivered while offline.
Markers
Sends a standard marker (e.g.
MarkerType.Displayed, MarkerType.Received) for the specified message IDs.Sends a custom string marker for the specified message IDs. Use this for application-specific receipts beyond the built-in set.
Editing and Deleting
Edits an existing message’s body or metadata. Subject to the
messageEditTimeout window configured in SceytChatUIKitConfig.Deletes a message. The
deleteType parameter controls whether the message is deleted only for the current user or for all participants.Channel Events and Live Flow
Sends a transient typing or custom event to the channel. These events are not persisted as messages.
Returns a hot
SharedFlow that emits a (SceytChannel, SceytMessage) pair whenever a new message arrives on any channel. Subscribe at the application level to drive notifications or badge updates.