Link Search Menu Expand Document

Constructor: messageService

Back to constructors index

Indicates a service message

Attributes:

NameTypeRequiredDescription
outBoolOptionalWhether the message is outgoing
mentionedBoolOptionalWhether we were mentioned in the message
media_unreadBoolOptionalWhether the message contains unread media
silentBoolOptionalWhether the message is silent
postBoolOptionalWhether it’s a channel post
legacyBoolOptionalThis is a legacy message: it has to be refetched with the new layer
idintYesMessage ID
from_idPeerOptionalID of the sender of this message
peer_idPeerYesSender of service message
reply_toMessageReplyHeaderOptionalReply (thread) information
dateintYesMessage date
actionMessageActionOptionalEvent connected with the service message
ttl_periodintOptionalTime To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.

Type: Message

Example:

$messageService = ['_' => 'messageService', 'out' => Bool, 'mentioned' => Bool, 'media_unread' => Bool, 'silent' => Bool, 'post' => Bool, 'legacy' => Bool, 'id' => int, 'from_id' => Peer, 'peer_id' => Peer, 'reply_to' => MessageReplyHeader, 'date' => int, 'action' => MessageAction, 'ttl_period' => int];