mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2025-01-05 02:53:58 +01:00
Enable rejection of Create Activities if the status includes unusable hashtags
This commit is contained in:
parent
a4e12a484d
commit
e9f439a625
1 changed files with 3 additions and 0 deletions
|
@ -86,6 +86,9 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
||||||
process_tags
|
process_tags
|
||||||
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)
|
||||||
|
|
Loading…
Reference in a new issue