tdlib / telegram-bot-api

Telegram Bot API server
https://core.telegram.org/bots
Boost Software License 1.0
2.94k stars 569 forks source link

NOT: User.language_code described at IETF but only being used as ISO-639? #589

Closed carafelix closed 1 month ago

carafelix commented 1 month ago

The bot api list the User.language_code as IETF, at https://core.telegram.org/bots/api#user, but at least from what I have seen, it is only using ISO 639. Could someone proof that is being used as IETF and not only ISO-639, if not, can we change the description to being ISO-639?

JsonUser class:

auto user_info = client_->get_user_info(user_id_);

https://github.com/tdlib/telegram-bot-api/blob/5951bfbab8b1274437c613c1c48d91be2a050371/telegram-bot-api/Client.cpp#L406-L408 get_user_info: https://github.com/tdlib/telegram-bot-api/blob/5951bfbab8b1274437c613c1c48d91be2a050371/telegram-bot-api/Client.cpp#L12301-L12303

Where is the users_ symbol or it's interface define? haven't found it. https://github.com/tdlib/telegram-bot-api/blob/5951bfbab8b1274437c613c1c48d91be2a050371/telegram-bot-api/Client.cpp#L195-L198

Loskir commented 1 month ago
image

yes, it is indeed used as IETF

carafelix commented 1 month ago

Thanks! Where did you get that list from?

Loskir commented 1 month ago

from the database of one of my bots