Merge pull request #6846 from annando/fix-mentions

Fix for the automatic mentioning
2022.09-rc
Tobias Diekershoff 2019-03-10 07:03:31 +01:00 zatwierdzone przez GitHub
commit 61fe82ad20
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -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'] . ' ';
}