MadelineProtoDocs/old_docs/API_docs_v30/constructors/updateServiceNotification.md
2020-06-16 17:50:25 +02:00

2.6 KiB

title: updateServiceNotification description: A service message for the user. The app must show the message to the user upon receiving this update. In case the popup parameter was passed, the text message must be displayed in a popup alert immediately upon receipt. It is recommended to handle the text as you would an ordinary message in terms of highlighting links, etc. The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications). image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: updateServiceNotification

Back to constructors index

A service message for the user.

The app must show the message to the user upon receiving this update. In case the popup parameter was passed, the text message must be displayed in a popup alert immediately upon receipt. It is recommended to handle the text as you would an ordinary message in terms of highlighting links, etc. The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications).

Attributes:

Name Type Required Description
popup Bool Optional (boolTrue) if the message must be displayed in a popup.
inbox_date int Optional When was the notification received
The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications).
type string Yes String, identical in format and contents to the type field in API errors. Describes type of service message. It is acceptable to ignore repeated messages of the same type within a short period of time (15 minutes).
message string Yes Message text
media MessageMedia Optional Media content (optional)
entities Array of MessageEntity Yes Message entities for styled text

Type: Update

Example:

$updateServiceNotification = ['_' => 'updateServiceNotification', 'popup' => Bool, 'inbox_date' => int, 'type' => 'string', 'message' => 'string', 'media' => MessageMedia, 'entities' => [MessageEntity, MessageEntity]];

Or, if you're into Lua:

updateServiceNotification={_='updateServiceNotification', popup=Bool, inbox_date=int, type='string', message='string', media=MessageMedia, entities={MessageEntity}}