mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-02 16:21:32 -08:00
block shitpost flood
This commit is contained in:
parent
43f0998391
commit
2cbaefd844
1 changed files with 3 additions and 0 deletions
|
@ -1177,6 +1177,9 @@ def create_post_reply(activity_log: ActivityPubLog, community: Community, in_rep
|
|||
post_reply.body_html = allowlist_html(request_json['object']['content'])
|
||||
post_reply.body = html_to_markdown(post_reply.body_html)
|
||||
if post_id is not None:
|
||||
# block shitpost flood
|
||||
if post_reply.body and "SNEED'S" in post_reply.body:
|
||||
return None
|
||||
post = Post.query.get(post_id)
|
||||
if post.comments_enabled:
|
||||
anchor = None
|
||||
|
|
Loading…
Add table
Reference in a new issue