getCommonChats

Get common chats between a user and the current one. User-only.

Parameters

userId: ID

The identifier of the user to get the common chats with them.

fromChatId?: ID

The identifier of a chat. If specified, the list of common chats will be fetched from that chat.

limit?: number

The maximum number of results to return. Must be in the range of 1-100. Defaults to 100.

Result

Syntax

// Required parameters only.
await client.getCommonChats(userId);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.getCommonChats(userId, { fromChatId, limit });