Stop Channel parsing if have invalid flags.
This commit is contained in:
parent
39d826937e
commit
7de27ca2c2
@ -2122,7 +2122,10 @@ void ChatManager::Channel::parse(ParserT &parser) {
|
||||
parse(photo, parser);
|
||||
}
|
||||
if (legacy_has_username) {
|
||||
CHECK(!has_usernames);
|
||||
if (has_usernames) {
|
||||
parser.set_error("Have invalid channel flags");
|
||||
return;
|
||||
}
|
||||
string username;
|
||||
parse(username, parser);
|
||||
usernames = Usernames(std::move(username), vector<telegram_api::object_ptr<telegram_api::username>>());
|
||||
|
Loading…
x
Reference in New Issue
Block a user