Merge pull request #6851 from annando/fix-mentions-again

Fix mentions - again
This commit is contained in:
Philipp 2019-03-11 08:21:32 +01:00 committed by GitHub
commit 6f3359cbcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -808,7 +808,7 @@ 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']) && (defaults($profile, 'contact-type') != Contact::TYPE_COMMUNITY) &&
if (!empty($profile['addr']) && (defaults($profile, 'contact-type', Contact::TYPE_COMMUNITY) != Contact::TYPE_COMMUNITY) &&
($profile['addr'] != $owner['addr']) && !strstr($text, $profile['addr'])) {
$text .= '@' . $profile['addr'] . ' ';
}