planiverse

A minimalist, no-JS front-end for Mastodon.
git clone https://git.mulligrubs.me/planiverse
Log | Files | Refs | README | LICENSE

commit 1894ac5d722f669097f8ec6c2878a0e6fa609832
parent 001d9f4be68b166a6bcd52fda4c3b8343cfbcd56
Author: St John Karp <contact@stjo.hn>
Date:   Sun, 17 Feb 2019 23:57:24 +0000

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.

Diffstat:
Mapp/Http/Controllers/StatusController.php | 8+-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php @@ -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 = [