From 7e91a88d9bc49cc91f4506729a8aef677ff827a5 Mon Sep 17 00:00:00 2001 From: Hank Grabowski Date: Mon, 13 Feb 2023 17:26:24 -0500 Subject: [PATCH] Add unsupported Friendica notification types to built query --- src/Module/Api/Mastodon/Notifications.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Module/Api/Mastodon/Notifications.php b/src/Module/Api/Mastodon/Notifications.php index 24564a715a..82ccd03edf 100644 --- a/src/Module/Api/Mastodon/Notifications.php +++ b/src/Module/Api/Mastodon/Notifications.php @@ -68,9 +68,12 @@ class Notifications extends BaseApi $params = ['order' => ['id' => true]]; - $condition = ['uid' => $uid, 'dismissed' => false]; - if ($request['include_all']) { - $condition = ['uid' => $uid]; + $condition = ["`uid` = ? AND (NOT `type` IN (?, ?))", $uid, + Post\UserNotification::TYPE_ACTIVITY_PARTICIPATION, + POST\UserNotification::TYPE_COMMENT_PARTICIPATION]; + + if (!$request['include_all']) { + $condition = DBA::mergeConditions($condition, ['dismissed' => false]); } if (!empty($request['account_id'])) { -- 2.39.5