messages.getCommonChats
Get chats in common with a user
func (c *Client) MessagesGetCommonChats(ctx context.Context, request *MessagesGetCommonChatsRequest) (MessagesChatsClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesGetCommonChats(ctx, &tg.MessagesGetCommonChatsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // MessagesChatsClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
UserID | InputUserClass | yes | User ID |
MaxID | int64 | yes | Maximum ID of chat to return (see pagination) |
Limit | int | yes | Maximum number of results to return, see pagination |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
| 400 | USER_ID_INVALID | The provided user ID is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.getCommonChats#e40ca104