From 337a3bb1aa4d9c51ed65b03d9a7efcf9ddf4dee6 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 10 Mar 2019 05:41:40 +0000 Subject: [PATCH] Fix for the automatic mentioning --- src/Object/Post.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Object/Post.php b/src/Object/Post.php index 807c2d2227..a4e3aed0c8 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -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'] . ' '; }