Interface ViewMessages

Informs TDLib that messages are being viewed by the user. Sponsored messages must be marked as viewed only when the entire text of the message is shown on the screen (excluding the button). Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels). Request type for Tdjson#viewMessages.

interface ViewMessages {
    @type: "viewMessages";
    chat_id: number;
    force_read?: boolean;
    message_ids: number[];
    source: MessageSource;
}

Properties

@type: "viewMessages"
chat_id: number

Chat identifier.

force_read?: boolean

Pass true to mark as read the specified messages even the chat is closed.

message_ids: number[]

The identifiers of the messages being viewed.

Source of the message view; pass null to guess the source based on chat open state.