From df9ed6af0e4aa4a1f30aac14ab00bf1c12d9b225 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 30 Jan 2022 13:46:11 +0000 Subject: [PATCH] Notifications for non contacts --- mod/item.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/item.php b/mod/item.php index d47a78053..7cf2e53d4 100644 --- a/mod/item.php +++ b/mod/item.php @@ -398,13 +398,13 @@ function item_post(App $a) { // Search for forum mentions foreach (Tag::getFromBody($body, Tag::TAG_CHARACTER[Tag::MENTION] . Tag::TAG_CHARACTER[Tag::EXCLUSIVE_MENTION]) as $tag) { - $contact = Contact::getByURL($tag[2], false, [], $profile_uid); + $contact = Contact::getByURLForUser($tag[2], $profile_uid); if (!empty($inform)) { $inform .= ','; } $inform .= 'cid:' . $contact['id']; - if (!$toplevel_item_id || ($contact['contact-type'] != Contact::TYPE_COMMUNITY)) { + if (!$toplevel_item_id || empty($contact['cid']) || ($contact['contact-type'] != Contact::TYPE_COMMUNITY)) { continue; }