diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index c133ef673a..489863fedb 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -86,6 +86,9 @@ class ActivityPub::Activity::Create < ActivityPub::Activity process_tags process_audience + # Reject the status unless all the hashtags are usable: + return reject_payload! unless @tags.all?(&:usable?) + ApplicationRecord.transaction do @status = Status.create!(@params) attach_tags(@status)