mirror of
https://github.com/mastodon/mastodon.git
synced 2026-08-22 01:44:48 -05:00
Enable rejection of Create Activities if the status includes unusable hashtags
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user