diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index fe33f7e408..e8fd2de15e 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -15,6 +15,10 @@ class ActivityPub::Activity::Create < ActivityPub::Activity private + def reject_pattern? + Setting.reject_pattern.present? && @object['content']&.match?(Setting.reject_pattern) + end + def create_status return reject_payload! if unsupported_object_type? || non_matching_uri_hosts?(@account.uri, object_uri) || tombstone_exists? || !related_to_local_activity? || reject_pattern?