ScheduledMessage

@Immutable
data class ScheduledMessage(val id: String, val cid: String, val channel: ChannelInfo?, val message: Message, val scheduledAt: Date, val status: ScheduledMessageStatus, val failure: ScheduledMessageFailure?, val createdAt: Date, val updatedAt: Date)

A message of the current user that the server sends to a channel at scheduledAt. Until it is sent, it can be edited, rescheduled, sent right away or deleted.

Constructors

Link copied to clipboard
constructor(id: String, cid: String, channel: ChannelInfo?, message: Message, scheduledAt: Date, status: ScheduledMessageStatus, failure: ScheduledMessageFailure?, createdAt: Date, updatedAt: Date)

Properties

Link copied to clipboard

A summary of the channel the message is sent to. The server sends it only with the results of a scheduled messages query, and the scheduled messages kept on the device keep the last one received, so it can be null.

Link copied to clipboard
val cid: String

The ID of the channel the message is sent to, in the format type:id.

Link copied to clipboard

The date when the message was scheduled.

Link copied to clipboard

Why the message could not be scheduled or sent, or null when nothing failed.

Link copied to clipboard
val id: String

The ID of the scheduled message. It is also the ID of message, and not the ID of the message the server creates when it sends it.

Link copied to clipboard

The content that will be sent. It is not in the messages of the channel until it is sent, and has no reactions, replies or read state. Its Message.createdAt is scheduledAt, so it can be shown like any other message, and its Message.updatedAt is the one of the scheduled message. The mentioned users and groups, the quoted message and the poll come as IDs only: in Message.mentionedUsersIds, Message.mentionedGroups (without names), Message.replyMessageId and the poll_id of Message.extraData.

Link copied to clipboard

The date when the server sends the message.

Link copied to clipboard

Where the scheduled message is, from scheduling until it is sent.

Link copied to clipboard

The date when the message was last edited or rescheduled.