Chat's marked ID, its username, phone or "me"
or "self"
.
Optional
params: {Additional fetch parameters
Optional
addOffset?: numberAdditional 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
maxId?: numberMaximum message ID to return.
Optional
minId?: numberMinimum 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.
Optional
chunkSize?: numberChunk size. Usually you shouldn't care about this.
Optional
limit?: numberLimits the number of messages to be retrieved.
Iterate over chat history. Wrapper over getHistory