tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

About usernames #2339

Closed wowka1319 closed 1 year ago

wowka1319 commented 1 year ago

Upgraded the lib to the last master commit (1.8.12) and noticed a change: Supergroup.username = string to Supergroup.usernames = active_usernames:vector<string>, disabled_usernames:vector<string>, editable_username:string.

  1. Now channels can have multiple usernames at the same time? They are in active_usernames? Or only the first username in active_usernames works? Otherwise what does primary username mean?
  2. What does editable_username mean? How it works?
levlam commented 1 year ago

Now channels can have multiple usernames at the same time?

Yes.

They are in active_usernames?

Yes.

Or only the first username in active_usernames works?

All usernames are equal.

Otherwise what does primary username mean?

It is the first active username. It is used whenever only one active username is needed.

What does editable_username mean? How it works?

Editable username is the only username, which can be changed through Telegram Apps. All other usernames must be bought and linked at https://fragment.com.

wowka1319 commented 1 year ago

For public supergroups usernames is not null always?

levlam commented 1 year ago

Yes.