zerobias / telegram-mtproto

Telegram client api (MTProto) library
MIT License
617 stars 136 forks source link

messages.addChatUser #225

Closed Inomezi closed 5 years ago

Inomezi commented 5 years ago

Hi, when i use the method "messages.addChatUser" i always get error "Error 400 CHAT_ID_INVALID 2 2". But chat_id can't be invalid because i get_id that channel through method "contacts.resolveUsername" My code const data = { chat_id: -1280097076, fwd_limit: 100, user_id: { access_hash: "12448153888672181274", userid: 332244255, : "inputUser" } }

await this.client('messages.addChatUser', data) // Error 400 CHAT_ID_INVALID 2 2

I've tried provide a chat_id with "-" and without it, but get the same error

"telegram-mtproto": "^2.2.2"