]> git.mxchange.org Git - friendica.git/commitdiff
Add unsupported Friendica notification types to built query
authorHank Grabowski <hankgrabowski@gmail.com>
Mon, 13 Feb 2023 22:26:24 +0000 (17:26 -0500)
committerHank Grabowski <hankgrabowski@gmail.com>
Mon, 13 Feb 2023 22:26:24 +0000 (17:26 -0500)
src/Module/Api/Mastodon/Notifications.php

index 24564a715a08aab1044b594586c89567a35010a7..82ccd03edfe6974f7cc5ba504f573cf90a9eeefb 100644 (file)
@@ -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'])) {