1
0
mirror of https://gitlab.com/brutaldon/brutaldon synced 2025-02-17 03:51:02 +01:00

Don't add blank line to replies with no mentions (self-replies)

This commit is contained in:
Jason McBrayer 2018-06-22 08:40:46 -04:00
parent b72c49e693
commit 320164a5d3

View File

@ -344,7 +344,8 @@ def reply(request, id):
initial_text = "" initial_text = ""
for mention in [x for x in toot.mentions if x.acct != request.session['user'].acct]: for mention in [x for x in toot.mentions if x.acct != request.session['user'].acct]:
initial_text +=('@' + mention.acct + " ") initial_text +=('@' + mention.acct + " ")
initial_text += "\n" if initial_text != "":
initial_text += "\n"
form = PostForm({'status': initial_text, form = PostForm({'status': initial_text,
'visibility': toot.visibility, 'visibility': toot.visibility,
'spoiler_text': toot.spoiler_text}) 'spoiler_text': toot.spoiler_text})