Compare commits

...

2 Commits

Author SHA1 Message Date
Emelia Smith
f68deffedc
Merge b6709d7ec9 into c442589593 2025-07-10 08:04:33 +00:00
Emelia Smith
b6709d7ec9
Enable rejection of Create Activities if the status includes unusable hashtags 2024-02-17 22:05:44 +01:00

View File

@ -53,6 +53,9 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
process_quote process_quote
process_audience process_audience
# Reject the status unless all the hashtags are usable:
return reject_payload! unless @tags.all?(&:usable?)
ApplicationRecord.transaction do ApplicationRecord.transaction do
@status = Status.create!(@params) @status = Status.create!(@params)
attach_tags(@status) attach_tags(@status)