From 320164a5d3881d9ae6fed51d9b57fc5d14cc7a4c Mon Sep 17 00:00:00 2001 From: Jason McBrayer Date: Fri, 22 Jun 2018 08:40:46 -0400 Subject: [PATCH] Don't add blank line to replies with no mentions (self-replies) --- brutaldon/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/brutaldon/views.py b/brutaldon/views.py index 368d83a..c6b8224 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -344,7 +344,8 @@ def reply(request, id): 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" + if initial_text != "": + initial_text += "\n" form = PostForm({'status': initial_text, 'visibility': toot.visibility, 'spoiler_text': toot.spoiler_text})