Add ChatFull.can_set_username.

GitOrigin-RevId: 1ccb89aaf6df6d9f70167ba1ff42eeef17a2d4cc
This commit is contained in:
levlam 2019-09-19 06:27:05 +03:00
parent 94908d20a1
commit 4007386372
2 changed files with 8 additions and 0 deletions

View File

@ -2835,6 +2835,7 @@ void ContactsManager::ChatFull::store(StorerT &storer) const {
BEGIN_STORE_FLAGS();
STORE_FLAG(has_description);
STORE_FLAG(has_invite_link);
STORE_FLAG(can_set_username);
END_STORE_FLAGS();
store(version, storer);
store(creator_user_id, storer);
@ -2855,6 +2856,7 @@ void ContactsManager::ChatFull::parse(ParserT &parser) {
BEGIN_PARSE_FLAGS();
PARSE_FLAG(has_description);
PARSE_FLAG(has_invite_link);
PARSE_FLAG(can_set_username);
END_PARSE_FLAGS();
parse(version, parser);
parse(creator_user_id, parser);
@ -7541,6 +7543,10 @@ void ContactsManager::on_get_chat_full(tl_object_ptr<telegram_api::ChatFull> &&c
chat->description = std::move(chat_full->about_);
chat->is_changed = true;
}
if (chat->can_set_username != chat_full->can_set_username_) {
chat->can_set_username = chat_full->can_set_username_;
chat->is_changed = true;
}
on_get_chat_participants(std::move(chat_full->participants_), false);
td_->messages_manager_->on_update_dialog_notify_settings(DialogId(chat_id), std::move(chat_full->notify_settings_),

View File

@ -646,6 +646,8 @@ class ContactsManager : public Actor {
string invite_link;
bool can_set_username = false;
bool is_changed = true;
template <class StorerT>