2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Update API scheme to layer 126.

This commit is contained in:
John Preston
2021-03-19 18:01:21 +04:00
parent 0052c7938f
commit a0a13c3b86
18 changed files with 447 additions and 300 deletions

View File

@@ -156,10 +156,11 @@ void ChatData::setAdminRights(const MTPChatAdminRights &rights) {
}
void ChatData::setDefaultRestrictions(const MTPChatBannedRights &rights) {
if (rights.c_chatBannedRights().vflags().v == defaultRestrictions()) {
const auto restrictionFlags = Data::ChatBannedRightsFlags(rights);
if (restrictionFlags == defaultRestrictions()) {
return;
}
_defaultRestrictions.set(rights.c_chatBannedRights().vflags().v);
_defaultRestrictions.set(restrictionFlags);
session().changes().peerUpdated(this, UpdateFlag::Rights);
}