Chat's marked ID, its username, phone or "me"
or "self"
.
Optional
params: { Additional fetch parameters
Optional
addAdditional offset from offset, in resulting messages.
This can be used for advanced use cases, like:
MSGID
:
offset = MSGID, addOffset = -20, limit = 20
MSGID
:
offset = MSGID, addOffset = -10, limit = 20
Optional
limit?: numberLimits the number of messages to be retrieved.
Optional
maxMaximum message ID to return.
Unless addOffset is used, this will work the same as offset.
Optional
minMinimum message ID to return
Optional
offset?: GetHistoryOffsetOffset for pagination
Optional
reverse?: booleanWhether to retrieve messages in reversed order (from older to recent), starting from offset (inclusive).
Note: Using
reverse=true
requires you to pass offset from which to start fetching the messages "downwards". If you callgetHistory
withreverse=true
and without any offset, it will return an empty array.
Get chat history.