messages.getCommonChats
Get chats in common with a user
Example
const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');
const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
const result = await client.invoke(new Api.messages.getCommonChats({
userId: new Api.InputUser({...}),
maxId: 2759156,
limit: 5781511,
}));
console.log(result); // prints the result
})();
TL schema
messages.chats#64ff9fd5 chats:Vector<Chat> = messages.Chats;
messages.chatsSlice#9cd81144 count:int chats:Vector<Chat> = messages.Chats;
---functions---
messages.getCommonChats#d0a48c4 user_id:InputUser max_id:int limit:int = messages.Chats;
Parameters
Name
Type
Description
Result
Possible errors
Code
Type
Description
400
MSG_ID_INVALID
Invalid message ID provided
400
USER_ID_INVALID
The provided user ID is invalid
Can bots use this methd ?
yes
Related pages
How to fetch results from large lists of objects.
Last updated
Was this helpful?