Don't duplicate original poster in mentions

Reply-to accounts were compiled by getting the original poster + all the
mentions returned by the API. The OP now seems to be included in the
mentions, which duplicated that account in the list. I've stripped
it down so it just uses the list of mentions returned by the API now.
This commit is contained in:
St John Karp 2019-02-17 23:57:24 +00:00
parent daa9343cb0
commit 98a5b744ed
1 changed files with 1 additions and 7 deletions

View File

@ -55,12 +55,6 @@ class StatusController extends Controller
$reply_mentions = [];
if (session()->has('user'))
{
# Include the original poster, if not the current user.
if ($status['account']['acct'] !== session('user')->user['acct'])
{
array_push($reply_mentions, '@' . $status['account']['acct']);
}
# Include all mentions, excluding the current user.
foreach ($status['mentions'] as $mention)
{
@ -68,7 +62,7 @@ class StatusController extends Controller
{
array_push($reply_mentions, '@' . $mention['acct']);
}
}
}
}
$vars = [