MessageRepository
Functions
Deletes message.
Deletes all messages from a channel.
Deletes all messages before a message with passed ID.
Delete a draft message.
Deletes the draft message of a channel, or of a thread when parentId is not null. Used when the draft is only identified by the channel/thread it belongs to, as happens with the draft.deleted event.
Deletes the list of Message objects.
Deletes a Poll by its ID.
Evicts a message from the repository.
Evict messages from the repository.
Insert a draft message.
Inserts a messages.
Inserts many messages.
Stores message as a local change that has not reached the server yet. insertDraftMessage stores the draft as synced again.
Moves the messages in SyncStatus.IN_PROGRESS that were deleted before deletedBefore, or deleted for the current user, to SyncStatus.COMPLETED.
Hides the draft of the channel or thread of message until its deletion reaches the server, when deleteDraftMessage removes it.
Selects all messages from a given user in a given channel.
Selects all messages from a given user.
Selects the drafts deleted locally whose deletion has not reached the server yet.
Selects a draft message by its parent message ID.
Selects all draft messages.
Selects a draft message by its channel ID.
Returns all messages for cid that are local-only: syncStatus is one of SYNC_NEEDED, IN_PROGRESS, AWAITING_ATTACHMENTS, FAILED_PERMANENTLY, or type is "ephemeral" or "error", including just-sent messages not yet written to storage. Used by the preservation mechanism before a server response replaces the active message window.
Reads the message with passed ID.
Selects all message of a SyncStatus
Selects all message ids of a SyncStatus
Selects messages by IDs.
Select messages for a channel in a desired page.
Select messages for a thread in a desired page.
Selects all messages with a poll with the passed ID.
Selects the drafts saved locally that have not reached the server yet.
Replaces the Message.member snapshot on every message a given user authored in a given channel.
Sets the SyncStatus of the stored message with messageId, leaving the rest of it as it is.