Fix inability to create ActivityPub messages

This commit is contained in:
Jeremy Kescher 2024-10-04 14:25:37 +02:00
parent 7bb89c5dfd
commit 6f7e917f32
No known key found for this signature in database
GPG key ID: 80A419A7A613DFA4

View file

@ -15,6 +15,10 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
private private
def reject_pattern?
Setting.reject_pattern.present? && @object['content']&.match?(Setting.reject_pattern)
end
def create_status 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? return reject_payload! if unsupported_object_type? || non_matching_uri_hosts?(@account.uri, object_uri) || tombstone_exists? || !related_to_local_activity? || reject_pattern?