Telegram MT v0.1.1-alpha MTProto.API.Messages View Source
Working with Messages and Chats as explained in :
Link to this section Summary
Functions
Adds a user to a chat and sends a service message on it
Changes chat photo and sends a service message on it
Creates a new chat
Deletes a user from a chat and sends a service message on it
Deletes communication history
Deletes messages by their identifiers
Changes chat name and sends a service message on it
Forwards single messages
Forwards messages by their IDs
Returns basic chat information by chat identifiers
Returns the current user dialog list
Returns complete chat information by chat identifier
Returns message history for a chat
Returns the list of messages by their IDs
Marks message history as read
Notifies the sender about the recipient having listened a voice message or watched a video
Confirms receipt of messages by a client, cancels PUSH-notification sending
Returns search messages
Sends multiple messages to contacts
Sends a non-text message
Sends a text message
Sends a current user typing event to a conversation partner or group
Link to this section Functions
Adds a user to a chat and sends a service message on it.
chat
- ID of the chat (integer)user_id
- ID of the user to be addedfwd_limit
- Number of last messages to be forwarded
Changes chat photo and sends a service message on it.
chat
- ID of the chat (integer)photo
- new photo, TL InputChatPhoto object
Creates a new chat.
users
- List of user IDs to be invited (List of InputUser)title
- chat name
Deletes a user from a chat and sends a service message on it.
chat
- ID of the chat (integer)user_id
- ID of the user to be removed
Deletes communication history.
peer
- User or chat, communication history of which will be deletedoffset
- Value from (messages.affectedHistory) or0
Deletes messages by their identifiers.
list
- Message ID list
Changes chat name and sends a service message on it.
chat
- ID of the chat (integer)title
- new title of the chat (string)
Forwards single messages.
peer
- User or chat where a message will be forwardedid
- Forwarded message ID
Forwards messages by their IDs.
peer
- User or chat where messages will be forwardedlist
- Message ID list
Returns basic chat information by chat identifiers.
chats
- list of chats IDs
Returns the current user dialog list.
offset
- number of list elements to be skipped.max_id
- if a positive value was transmitted sent, the method will return only dialogs with IDs less than the set one.limit
- number of list elements to be returned.
Returns complete chat information by chat identifier.
chat
- ID of the chat (integer)
Returns message history for a chat.
peer
- Target user or groupoffset
- Number of list elements to be skippedmax_id
- only messages with IDs less than max_idlimit
- Number of list elements to be returned
Returns the list of messages by their IDs.
list
- Message ID list.
Marks message history as read.
peer
- Target user or groupmax_id
- only messages with identifiers less or equal than the given one will be readoffset
- Value from (messages.affectedHistory)read_contents
- boolean
Notifies the sender about the recipient having listened a voice message or watched a video.
list
- Message ID list
Confirms receipt of messages by a client, cancels PUSH-notification sending.
max_id
- Maximum message ID available in a client
Returns search messages.
peer
- User or chat, histories with which are searched, or (inputPeerEmpty) constructor for global searchq
- Text search requestfilter
- Additional filtermin_date
- only messages with a sending date bigger than the transferred one will be returnedmax_date
- only messages with a sending date less than the transferred one will be returnedoffset
- Number of list elements to be skippedmax_id
- If a positive value was transferred, the method will return only messages with IDs less than the set onelimit
- Number of list elements to be returned
Sends multiple messages to contacts.
contacts
- List of user ID to whom a message will be sentmessage
- Message textmedia
- Message media-contents
Sends a non-text message.
dst
- user or group to receive the message, TL InputPeer object.media
- message content, TL InputMedia object.
Sends a text message.
dst
- user or chat where a message will be sent, TL InputPeer object.message
- message text.
Sends a current user typing event to a conversation partner or group.
dst
- Target user or group, TL InputPeer object.typing
- Typing status, boolean.action
- Type of action, TL SendMessageAction object.