diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index 5d700b49613..be886a0705b 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -82,6 +82,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)