1
1
Fork 0

Fix for the automatic mentioning

This commit is contained in:
Michael 2019-03-10 05:41:40 +00:00
parent af77af0446
commit 337a3bb1aa

View file

@ -806,10 +806,9 @@ class Post extends BaseObject
} }
$terms = Term::tagArrayFromItemId($this->getId(), [Term::MENTION, Term::IMPLICIT_MENTION]); $terms = Term::tagArrayFromItemId($this->getId(), [Term::MENTION, Term::IMPLICIT_MENTION]);
foreach ($terms as $term) { foreach ($terms as $term) {
$profile = Contact::getDetailsByURL($term['url']); $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'])) { ($profile['addr'] != $owner['addr']) && !strstr($text, $profile['addr'])) {
$text .= '@' . $profile['addr'] . ' '; $text .= '@' . $profile['addr'] . ' ';
} }