getChatLastMessages

TrueConf7/5/26About 2 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

void getChatLastMessages(string sId, int iBeginNumber, int iCount)

Parameters

NameDescription
sIdUnique chat identifier
iBeginNumberNumber starting from which messages are sent
iCountMessage count

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
}

Response Parameters

NameDescription
messagesThe list of messages
textMessage text
timeThe timestamp indicating when the message was created
peerIdUnique identifier (TrueConf ID) of a user who sent or received a file
directionThe type of message. The following types are possible:
• 0 - Incoming
• 1 - Outgoing
requestIdA unique request identifier
resultA flag indicating whether the request was successful

See also

Last Updated: