2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Update API scheme on layer 140.

This commit is contained in:
John Preston
2022-04-06 16:27:23 +04:00
parent 7b307a9e54
commit d9f6a5206e
9 changed files with 25 additions and 34 deletions

View File

@@ -179,8 +179,7 @@ rpl::producer<bool> CanWriteValue(ChatData *chat) {
| ChatDataFlag::Deactivated
| ChatDataFlag::Forbidden
| ChatDataFlag::Left
| ChatDataFlag::Creator
| ChatDataFlag::Kicked;
| ChatDataFlag::Creator;
return rpl::combine(
PeerFlagsValue(chat, mask),
AdminRightsValue(chat),
@@ -194,8 +193,7 @@ rpl::producer<bool> CanWriteValue(ChatData *chat) {
const auto amOutFlags = 0
| ChatDataFlag::Deactivated
| ChatDataFlag::Forbidden
| ChatDataFlag::Left
| ChatDataFlag::Kicked;
| ChatDataFlag::Left;
return !(flags & amOutFlags)
&& ((flags & ChatDataFlag::Creator)
|| (adminRights.value != ChatAdminRights(0))
@@ -262,8 +260,7 @@ rpl::producer<bool> CanPinMessagesValue(not_null<PeerData*> peer) {
| ChatDataFlag::Deactivated
| ChatDataFlag::Forbidden
| ChatDataFlag::Left
| ChatDataFlag::Creator
| ChatDataFlag::Kicked;
| ChatDataFlag::Creator;
return rpl::combine(
PeerFlagsValue(chat, mask),
AdminRightValue(chat, ChatAdminRight::PinMessages),
@@ -275,8 +272,7 @@ rpl::producer<bool> CanPinMessagesValue(not_null<PeerData*> peer) {
const auto amOutFlags = 0
| ChatDataFlag::Deactivated
| ChatDataFlag::Forbidden
| ChatDataFlag::Left
| ChatDataFlag::Kicked;
| ChatDataFlag::Left;
return !(flags & amOutFlags)
&& ((flags & ChatDataFlag::Creator)
|| adminRightAllows