From 9a85421a0e0c9b8d0c29c57ad9888defcf9084e1 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 13 Feb 2024 14:05:30 +0000 Subject: we are now using the item uuid for the notification hash if available. since we can have more than one notification per item (e.g. tag and comment) also look for the notification type to make sure we get the right one --- Zotlabs/Lib/Enotify.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index a9eaf3136..8a980519d 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -512,7 +512,7 @@ class Enotify { $datarray['link'] = $itemlink; $datarray['parent'] = $parent_mid; $datarray['parent_item'] = $parent_item; - $datarray['ntype'] = $params['type'] ?? ''; + $datarray['ntype'] = $params['type'] ?? 0; $datarray['verb'] = $params['verb'] ?? ''; $datarray['otype'] = $params['otype'] ?? ''; $datarray['abort'] = false; @@ -560,8 +560,9 @@ class Enotify { dbesc($datarray['otype']) ); - $r = q("select id from notify where hash = '%s' and uid = %d limit 1", + $r = q("select id from notify where hash = '%s' and ntype = %d and uid = %d limit 1", dbesc($datarray['hash']), + intval($datarray['ntype']), intval($recip['channel_id']) ); if ($r) { -- cgit v1.2.3