Enable rejection of Create Activities if the status includes unusable hashtags

pull/29264/head
Emelia Smith 1 year ago
parent 96ddf1d482
commit b6709d7ec9
No known key found for this signature in database

@ -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)

Loading…
Cancel
Save