]> git.mxchange.org Git - friendica.git/commitdiff
Add mentions to poke posts
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 22 Dec 2020 06:02:06 +0000 (01:02 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 22 Dec 2020 06:02:06 +0000 (01:02 -0500)
src/Module/Contact/Poke.php

index d9fab36c02e87a79be771242e72be4554fe0ed66..73131daa41f95df9761cf72c01ce251c09c898c9 100644 (file)
@@ -44,7 +44,7 @@ class Poke extends BaseModule
 
                Logger::info('verb ' . $verb . ' contact ' . $contact_id);
 
-               $contact = DBA::selectFirst('contact', ['id', 'name'], ['id' => $parameters['id'], 'uid' => local_user()]);
+               $contact = DBA::selectFirst('contact', ['id', 'name', 'url'], ['id' => $parameters['id'], 'uid' => local_user()]);
                if (!DBA::isResult($contact)) {
                        return self::postReturn(false);
                }
@@ -86,7 +86,7 @@ class Poke extends BaseModule
                $arr['object-type']   = Activity\ObjectType::PERSON;
 
                $arr['origin']        = 1;
-               $arr['body']          = '[url=' . $actor['url'] . ']' . $actor['name'] . '[/url]' . ' ' . $verbs[$verb][2] . ' ' . '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
+               $arr['body']          = '@[url=' . $actor['url'] . ']' . $actor['name'] . '[/url]' . ' ' . $verbs[$verb][2] . ' ' . '@[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
 
                $arr['object'] = '<object><type>' . Activity\ObjectType::PERSON . '</type><title>' . XML::escape($contact['name']) . '</title><id>' . XML::escape($contact['url']) . '</id>';
                $arr['object'] .= '<link>' . XML::escape('<link rel="alternate" type="text/html" href="' . $contact['url'] . '" />') . "\n";