From 2ce118080df77fa8f280b3f02e4135f8f5153b93 Mon Sep 17 00:00:00 2001 From: Jason McBrayer Date: Wed, 13 Jun 2018 13:42:40 -0400 Subject: [PATCH] Work harder to not mention yourself. --- brutaldon/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/brutaldon/views.py b/brutaldon/views.py index 636bca5..368d83a 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -338,7 +338,10 @@ def reply(request, id): mastodon = get_mastodon(request) toot = mastodon.status(id) context = mastodon.status_context(id) - initial_text = '@' + toot.account.acct + " " + if toot.account.acct != request.session['user'].acct: + initial_text = '@' + toot.account.acct + " " + else: + initial_text = "" for mention in [x for x in toot.mentions if x.acct != request.session['user'].acct]: initial_text +=('@' + mention.acct + " ") initial_text += "\n"