From 9150ba7629d17e74aa57b8b3081c2ee0e53f2f77 Mon Sep 17 00:00:00 2001 From: Jason McBrayer Date: Thu, 24 Jan 2019 08:27:07 -0500 Subject: [PATCH] Improve accuracy of user page link on Pleroma --- brutaldon/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/brutaldon/views.py b/brutaldon/views.py index edd0462..b27102d 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -388,7 +388,8 @@ def user(request, username, prev=None, next=None): except NotLoggedInException: return redirect(about) try: - user_dict = mastodon.account_search(username)[0] + user_dict = [dict for dict in mastodon.account_search(username) + if dict.acct == username][0] except (IndexError, AttributeError): raise Http404(_("The user %s could not be found.") % username) data = mastodon.account_statuses(user_dict.id, max_id=next, since_id=prev)