From 043e2224b00adbbe62e2bfae7e926cfdb0b2bdfc Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 22 Dec 2020 01:02:06 -0500 Subject: [PATCH] Add mentions to poke posts --- src/Module/Contact/Poke.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module/Contact/Poke.php b/src/Module/Contact/Poke.php index d9fab36c0..73131daa4 100644 --- a/src/Module/Contact/Poke.php +++ b/src/Module/Contact/Poke.php @@ -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'] = '' . Activity\ObjectType::PERSON . '' . XML::escape($contact['name']) . '' . XML::escape($contact['url']) . ''; $arr['object'] .= '' . XML::escape('') . "\n";