-
-function item_add_implicit_mentions(array $tags, array $thread_parent_contact, $thread_parent_uriid)
-{
- if (!DI::config()->get('system', 'disable_implicit_mentions')) {
- return $tags;
- }
-
- // Add a tag if the parent contact is from ActivityPub or OStatus (This will notify them)
- if (in_array($thread_parent_contact['network'], [Protocol::OSTATUS, Protocol::ACTIVITYPUB])) {
- $contact = Tag::TAG_CHARACTER[Tag::MENTION] . '[url=' . $thread_parent_contact['url'] . ']' . $thread_parent_contact['nick'] . '[/url]';
- if (!stripos(implode($tags), '[url=' . $thread_parent_contact['url'] . ']')) {
- $tags[] = $contact;
- }
- }
-
- return $tags;
-}