mirror of
https://github.com/friendica/friendica
synced 2025-04-25 09:10:11 +00:00
(Hopefully) SQL improvements
This commit is contained in:
parent
be9bbe1709
commit
3911c9450b
11 changed files with 34 additions and 35 deletions
|
@ -79,13 +79,13 @@ class Notifications extends BaseApi
|
|||
|
||||
if (in_array(Notification::TYPE_INTRODUCTION, $request['exclude_types'])) {
|
||||
$condition = DBA::mergeConditions($condition,
|
||||
["(`vid` != ? OR `type` != ? OR NOT EXISTS (SELECT `id` FROM `contact` WHERE `id` = `actor-id` AND `pending`))",
|
||||
["(`vid` != ? OR `type` != ? OR NOT `actor-id` IN (SELECT `id` FROM `contact` WHERE `pending`))",
|
||||
Verb::getID(Activity::FOLLOW), Post\UserNotification::TYPE_NONE]);
|
||||
}
|
||||
|
||||
if (in_array(Notification::TYPE_FOLLOW, $request['exclude_types'])) {
|
||||
$condition = DBA::mergeConditions($condition,
|
||||
["(`vid` != ? OR `type` != ? OR NOT EXISTS (SELECT `id` FROM `contact` WHERE `id` = `actor-id` AND NOT `pending`))",
|
||||
["(`vid` != ? OR `type` != ? OR NOT `actor-id` IN (SELECT `id` FROM `contact` WHERE NOT `pending`))",
|
||||
Verb::getID(Activity::FOLLOW), Post\UserNotification::TYPE_NONE]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue