c# - Telegram API (not Bot!): How to get chat/channel ID by link to it? -


i'm using library tlsharp on c# , writing telegram client, , @ moment got stuck.

i have link chat/channel, instance, https://t.me/joinchat/some-string, , i'd info chat/channel or join it. can having chat_id, don't know how get.

firstly thought contacts.resolveusername , passing "some-string" link. doesn't work, saying username invalid.

is there way id of group? , on purpose make complicated info groups?

thanks

well, i've found solution (partial, see end). i'm using this schema, let know.

  1. first of need send rpc messages.checkchatinvite parameter hash set last part of link ("some-string" in case).

  2. a response of type tlchatinvite arrives. contain primary info group: it's type (chat or channel?), participant count and, if you're lucky, vector.

(this point below problem of mine)

  1. call rpc messages.importchatinvite same parameter hash. returns tlupdates or tlupdatescombined object, contain vector of tlchat objects. need use first (don't forget check vector emptiness, though, in case).

however, messages.importchatinvite make current user join group. how id of group without getting joined haven't got clue. though, thing fit client.

frankly said, i'm disappointed consumed time such trivial thing.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -