1
0
mirror of https://gitlab.com/brutaldon/brutaldon synced 2024-12-29 00:59:53 +01:00

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

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})