Layer 220
MessageService
Indicates a service message
constructor
messageService#7a800e0a flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true reactions_are_possible:flags.9?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer saved_peer_id:flags.28?Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction reactions:flags.20?MessageReactions ttl_period:flags.25?int = Message;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Out | flags.1?true | Whether the message is outgoing |
| Mentioned | flags.4?true | Whether we were mentioned in the message |
| MediaUnread | flags.5?true | Whether the message contains unread media |
| ReactionsArePossible | flags.9?true | Whether you can react to this message. |
| Silent | flags.13?true | Whether the message is silent |
| Post | flags.14?true | Whether it's a channel post |
| Legacy | flags.19?true | This is a legacy message: it has to be refetched with the new layer |
| Id | int | Message ID |
| FromId | flags.8?Peer | ID of the sender of this message |
| PeerId | Peer | Sender of service message |
| SavedPeerId | flags.28?Peer | Will only be set for service messages within a monoforum topic: peer will be equal to the ID of the monoforum and the saved_peer_id flag will be set to the ID of a topic. |
| ReplyTo | flags.3?MessageReplyHeader | Reply (thread) information |
| Date | int | Message date |
| Action | MessageAction | Event connected with the service message |
| Reactions | flags.20?MessageReactions | Reactions. |
| TtlPeriod | flags.25?int | Time 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. |
Returns
MessageGogram Example
// Creating MessageService constructor obj := &tg.MessageService{ Id: 0, PeerId: &tg.Peer{}, Date: 0, Action: &tg.MessageAction{}, // Optional fields: // Out: true, // Mentioned: true, // MediaUnread: true, // ReactionsArePossible: true, // ... more optional fields }