Enable rejection of Create Activities if the status includes unusable hashtags

This commit is contained in:
丈槍由紀 2024-02-17 16:15:39 -05:00 committed by Jeremy Kescher
parent a4e12a484d
commit e9f439a625
No known key found for this signature in database
GPG key ID: 80A419A7A613DFA4

View file

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