Skip to content

viewMessages

Sahri Riza Umami edited this page Jun 23, 2018 · 4 revisions

This method should be called if messages are being viewed by the user.
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, message_ids, force_read, callback, data)
Field Type Description
chat_id int53 Chat identifier.
message_ids vector The identifiers of the messages being viewed.
force_read Bool True, if messages in closed chats should be marked as read.

Example

  • Messages id 17, 42, and 212 from chat 1234567890 are viewed by the user.

    viewMessages(1234567890, {[0] = 17, 42, 212}, 1)

    Response:

    {
      ["@type"] = "ok"
    }

Frequently Asked Questions
The Functions

Clone this wiki locally