From 2d3d88da7298c1ddadbb00f3eefbe7371c777910 Mon Sep 17 00:00:00 2001 From: Jason McBrayer Date: Thu, 24 Jan 2019 08:48:44 -0500 Subject: [PATCH] Fix local user references with domain name on Pleroma --- brutaldon/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/brutaldon/views.py b/brutaldon/views.py index b27102d..072d046 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -389,7 +389,8 @@ def user(request, username, prev=None, next=None): return redirect(about) try: user_dict = [dict for dict in mastodon.account_search(username) - if dict.acct == username][0] + if ((dict.acct == username) or + (dict.acct == username.split('@')[0]))][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)