Merge pull request #6909 from annando/fix-mentions

Fixing automention
2022.09-rc
Hypolite Petovan 2019-03-19 22:20:39 -04:00 zatwierdzone przez GitHub
commit 3a0a6cd659
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

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