]> git.mxchange.org Git - friendica.git/commitdiff
Fix for the automatic mentioning
authorMichael <heluecht@pirati.ca>
Sun, 10 Mar 2019 05:41:40 +0000 (05:41 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 10 Mar 2019 05:41:40 +0000 (05:41 +0000)
src/Object/Post.php

index 807c2d2227364ecb510503668c8118c5a1bdc807..a4e3aed0c89defac8b78a99706dd00f039b5a22a 100644 (file)
@@ -806,10 +806,9 @@ class Post extends BaseObject
                }
 
                $terms = Term::tagArrayFromItemId($this->getId(), [Term::MENTION, Term::IMPLICIT_MENTION]);
-
                foreach ($terms as $term) {
                        $profile = Contact::getDetailsByURL($term['url']);
-                       if (!empty($profile['addr']) && !empty($profile['contact-type']) && ($profile['contact-type'] != Contact::TYPE_COMMUNITY) &&
+                       if (!empty($profile['addr']) && (defaults($profile, 'contact-type') != Contact::TYPE_COMMUNITY) &&
                                ($profile['addr'] != $owner['addr']) && !strstr($text, $profile['addr'])) {
                                $text .= '@' . $profile['addr'] . ' ';
                        }