Skip to content

viewMessages

Function · TDLib 1.8.67 · d1085f9c

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)

viewMessages(
  chat_id: int53,
  message_ids: list of int53,
  source: MessageSource,
  force_read: Bool
) → Ok

chat_id

int53

Chat identifier

message_ids

list of int53

The identifiers of the messages being viewed

source

MessageSource

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

force_read

Bool

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