Don't show contacts that we ignore or block

This commit is contained in:
Michael 2023-09-02 16:16:56 +00:00
parent cfc639ffe4
commit 990b65b859

View File

@ -290,6 +290,9 @@ class Channel extends BaseModule
$condition = ["`media-type` & ?", 4]; $condition = ["`media-type` & ?", 4];
} }
$condition[0] .= " AND NOT EXISTS(SELECT `cid` FROM `user-contact` WHERE `uid` = ? AND `cid` = `post-engagement`.`owner-id` AND (`ignored` OR `blocked` OR `collapsed`))";
$condition[] = DI::userSession()->getLocalUserId();
if ((self::$content != self::WHATSHOT) && !is_null(self::$accountType)) { if ((self::$content != self::WHATSHOT) && !is_null(self::$accountType)) {
$condition[0] .= " AND `contact-type` = ?"; $condition[0] .= " AND `contact-type` = ?";
$condition[] = self::$accountType; $condition[] = self::$accountType;