getChatLastMessages
About 1 min
getChatLastMessages
Description: Get a list of chat messages.
The command is used to get a certain number of messages from the chat, starting from the message with the given index.
Request example:
{
"method": "getChatLastMessages",
"requestId" : "1",
"chatId": "b3b6e79f00677a63b545791fafca80d1119e56c3",
"beginNumber": 0,
"count": 10
}Response example:
{
"method": "getChatLastMessages",
"requestId" : "1",
"messages": [
{
"text": "hello",
"time": 1661428897,
"peerId": "user@some.server",
"direction": 0
},
{
"text": "hi",
"time": 1661428876,
"peerId": "user@some.server",
"direction": 0
}
],
"result": true
}Parameter description:
chatId— Unique chat identifierbeginNumber— Number starting from which messages are sent.count— Message countmessages— the list of messagestext— Message text.time— the timestamp indicating when the message was createdpeerId- a unique identifier of the user (TrueConf ID) of the sender or receiverdirection— the type of message. The following types are possible:0— Incoming1— Outgoing
requestId- a unique request identifier. You can find more details about it here.
See also: