X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FNotifier.php;h=80628d7dba08d08fe5e55a3dabc84886e2a27038;hb=a30b553c2851520a8de7576a7f5a17eab73df603;hp=abd5613dd0bc9937e91028b85f9e7da2c3affcf2;hpb=49dd97e5fdbef3e8cb870a7800bd5bfdca6bd758;p=friendica.git diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index abd5613dd0..80628d7dba 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -445,7 +445,7 @@ class Notifier $condition = ['network' => Protocol::DFRN, 'uid' => $owner['uid'], 'blocked' => false, 'pending' => false, 'archive' => false, 'rel' => [Contact::FOLLOWER, Contact::FRIEND]]; - $contacts = DBA::toArray(DBA::select('contact', ['id', 'url', 'addr', 'name', 'network', 'protocol'], $condition)); + $contacts = DBA::selectToArray('contact', ['id', 'url', 'addr', 'name', 'network', 'protocol'], $condition); $conversants = array_merge($contacts, $participants); @@ -673,7 +673,7 @@ class Notifier } while($contact = DBA::fetch($contacts_stmt)) { - Protocol::terminateFriendship($owner, $contact, true); + Contact::terminateFriendship($contact); } DBA::close($contacts_stmt); @@ -730,9 +730,9 @@ class Notifier $uid = $target_item['contact-uid'] ?: $target_item['uid']; // Update the locally stored follower list when we deliver to a forum - foreach (Tag::getByURIId($target_item['uri-id'], [Tag::EXCLUSIVE_MENTION]) as $tag) { + foreach (Tag::getByURIId($target_item['uri-id'], [Tag::MENTION, Tag::EXCLUSIVE_MENTION]) as $tag) { $target_contact = Contact::getByURL(Strings::normaliseLink($tag['url']), null, [], $uid); - if (($target_contact['contact-type'] == Contact::TYPE_COMMUNITY) && $target_contact['manually-approve']) { + if ($target_contact && $target_contact['contact-type'] == Contact::TYPE_COMMUNITY && $target_contact['manually-approve']) { Group::updateMembersForForum($target_contact['id']); } }