return $match[0];
}
- return '@[url=' . $data['url'] . ']' . $data['nick'] . '[/url]';
+ return '[url=' . $data['url'] . ']@' . $data['nick'] . '[/url]';
}
/**
}
if (empty($item['uid']) || !Feature::isEnabled($item['uid'], 'explicit_mentions')) {
- $body = self::prependMentions($body, $item['uri-id']);
+ $body = self::prependMentions($body, $item['uri-id'], $item['author-link']);
}
if ($type == 'Event') {
return HTTPSignature::transmit($signed, $profile['inbox'], $uid);
}
- private static function prependMentions($body, int $uriid)
+ private static function prependMentions($body, int $uriid, string $authorLink)
{
$mentions = [];
&& $profile['contact-type'] != Contact::TYPE_COMMUNITY
&& !strstr($body, $profile['addr'])
&& !strstr($body, $tag['url'])
+ && $tag['url'] !== $authorLink
) {
$mentions[] = '@[url=' . $tag['url'] . ']' . $profile['nick'] . '[/url]';
}