2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Implement report spam from ContactStatus bar.

This commit is contained in:
John Preston
2019-06-10 16:58:45 +02:00
parent f49c7ba7ee
commit 213a8d888a
8 changed files with 121 additions and 106 deletions

View File

@@ -154,10 +154,12 @@ rpl::producer<bool> CanShareContactValue(not_null<UserData*> user) {
rpl::producer<bool> CanAddContactValue(not_null<UserData*> user) {
using namespace rpl::mappers;
return rpl::combine(
IsContactValue(user),
CanShareContactValue(user),
!_1 && _2);
if (user->isBot() || user->isSelf()) {
return rpl::single(false);
}
return IsContactValue(
user
) | rpl::map(!_1);
}
rpl::producer<bool> AmInChannelValue(not_null<ChannelData*> channel) {