Don't include self-mention when replying on a thread you're in.

This commit is contained in:
Jason McBrayer 2018-06-04 09:09:34 -04:00
parent dd8eb95a42
commit aa763cc1d0
1 changed files with 2 additions and 1 deletions

View File

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