Don't include broken users in reply mentions

Fixes #192
pull/197/head
Andrew Godwin 2022-12-18 09:50:29 -07:00
rodzic bcd48368b5
commit 5d6ff57b5f
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -86,7 +86,6 @@ class Compose(FormView):
raise forms.ValidationError(
f"You must wait at least {Config.system.post_minimum_interval} seconds between posts"
)
print(last_post)
if not text:
return text
# Check post length
@ -126,7 +125,9 @@ class Compose(FormView):
mentioned.update(self.reply_to.mentions.all())
mentioned.discard(self.request.identity)
initial["text"] = "".join(
f"@{identity.handle} " for identity in mentioned
f"@{identity.handle} "
for identity in mentioned
if identity.username
)
return initial