Merge pull request #11621 from annando/notice

Avoid notice when a contact couldn't be fetched
This commit is contained in:
Tobias Diekershoff 2022-06-08 07:42:20 +02:00 committed by GitHub
commit 86837ddb4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -498,6 +498,9 @@ class Item
// Search for forum mentions
foreach (Tag::getFromBody($item['body'], Tag::TAG_CHARACTER[Tag::MENTION] . Tag::TAG_CHARACTER[Tag::EXCLUSIVE_MENTION]) as $tag) {
$contact = Contact::getByURLForUser($tag[2], $item['uid']);
if (empty($contact)) {
continue;
}
$receivers[] = $contact['id'];