mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-13 04:37:11 +02:00
Removed reactions list for anonymous non-owner admins.
This commit is contained in:
parent
0c4bca312e
commit
3f24627f54
1 changed files with 8 additions and 0 deletions
|
@ -17,6 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "main/main_app_config.h"
|
||||
#include "main/session/send_as_peers.h"
|
||||
#include "data/components/credits.h"
|
||||
#include "data/data_channel.h"
|
||||
#include "data/data_user.h"
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_histories.h"
|
||||
|
@ -175,6 +176,13 @@ PossibleItemReactionsRef LookupPossibleReactions(
|
|||
}
|
||||
}
|
||||
const auto session = &peer->session();
|
||||
if (const auto channel = peer->asChannel()) {
|
||||
if ((!channel->amCreator())
|
||||
&& (channel->adminRights() & ChatAdminRight::Anonymous)
|
||||
&& (session->sendAsPeers().resolveChosen(channel) == channel)) {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
const auto reactions = &session->data().reactions();
|
||||
const auto &full = reactions->list(Reactions::Type::Active);
|
||||
const auto &top = reactions->list(Reactions::Type::Top);
|
||||
|
|
Loading…
Add table
Reference in a new issue