]> git.mxchange.org Git - friendica.git/commitdiff
Fix notice "Undefined index: forum"
authorMichael <heluecht@pirati.ca>
Fri, 26 Jun 2020 05:29:00 +0000 (05:29 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 26 Jun 2020 05:29:00 +0000 (05:29 +0000)
src/Protocol/OStatus.php

index a2181beeb3ef546159982fa4004d57c12b9d7d6f..2720d6050ff5324d4c66ad327382826207b6cbac 100644 (file)
@@ -2087,9 +2087,8 @@ class OStatus
                $mentioned = $newmentions;
 
                foreach ($mentioned as $mention) {
-                       $contact = Contact::getDetailsByURL($mention, $owner['uid']);
-                       if (!empty($contact) && ($contact["forum"] || $contact["prv"] || ($owner['contact-type'] == Contact::TYPE_COMMUNITY) ||
-                               ($contact['self'] && ($owner['account-type'] == User::ACCOUNT_TYPE_COMMUNITY)))) {
+                       $contact = Contact::getByURL($mention, 0, ['contact-type']);
+                       if (!empty($contact) && ($contact['contact-type'] == Contact::TYPE_COMMUNITY)) {
                                XML::addElement($doc, $entry, "link", "",
                                        [
                                                "rel" => "mentioned",