mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
feat: shadowban on channels
Co-authored-by: Emil <40684650+MrCheatEugene@users.noreply.github.com>
This commit is contained in:
@@ -117,7 +117,7 @@ bool isBlocked(const not_null<HistoryItem*> item) {
|
||||
|
||||
return settings.filtersEnabled &&
|
||||
(
|
||||
(item->from()->isUser() && ShadowBanUtils::isShadowBanned(getDialogIdFromPeer(item->from()))) ||
|
||||
((item->from()->isUser() || item->from()->isBroadcast()) && ShadowBanUtils::isShadowBanned(getDialogIdFromPeer(item->from()))) ||
|
||||
(settings.hideFromBlocked && blocked)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ void AddOpenChannelAction(PeerData *peerData,
|
||||
void AddShadowBanAction(PeerData *peerData,
|
||||
const Window::PeerMenuCallback &addCallback) {
|
||||
const auto &settings = AyuSettings::getInstance();
|
||||
if (!peerData || !peerData->isUser() || !settings.filtersEnabled) {
|
||||
if (!peerData || !(peerData->isUser() || peerData->isBroadcast()) || !settings.filtersEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user