use Friendica\Model\Contact;
use Friendica\Model\Item;
use Friendica\Model\Term;
+use Friendica\Model\User;
use Friendica\Util\Crypto;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Proxy as ProxyUtils;
{
$a = self::getApp();
- if (!local_user() || empty($a->profile['addr'])) {
+ if (!local_user()) {
return '';
}
+ $owner = User::getOwnerDataById($a->user['uid']);
+
if (!Feature::isEnabled(local_user(), 'explicit_mentions')) {
return '';
}
return '';
}
- if ($item['author-addr'] != $a->profile['addr']) {
+ if ($item['author-addr'] != $owner['addr']) {
$text = '@' . $item['author-addr'] . ' ';
} else {
$text = '';
foreach ($terms as $term) {
$profile = Contact::getDetailsByURL($term['url']);
- if (!empty($profile['addr']) && ($profile['contact-type'] != Contact::TYPE_COMMUNITY) &&
- ($profile['addr'] != $a->profile['addr']) && !strstr($text, $profile['addr'])) {
+ if (($profile['contact-type'] != Contact::TYPE_COMMUNITY) &&
+ ($profile['addr'] != $owner['addr']) && !strstr($text, $profile['addr'])) {
$text .= '@' . $profile['addr'] . ' ';
}
}