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:
@@ -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
|
||||
|
Reference in New Issue
Block a user