mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-29 22:16:22 +00:00
Merge branch 'issue-15109-1' of https://0xacab.org/sutty/sutty into production.panel.sutty.nl
This commit is contained in:
commit
14d8ce9af2
2 changed files with 9 additions and 3 deletions
|
@ -14,9 +14,15 @@ class ActivityPub
|
||||||
# @see {https://docs.joinmastodon.org/spec/security/#ld}
|
# @see {https://docs.joinmastodon.org/spec/security/#ld}
|
||||||
def update_activity_pub_state!
|
def update_activity_pub_state!
|
||||||
ActivityPub.transaction do
|
ActivityPub.transaction do
|
||||||
ActivityPub::Object.find_by(uri: ActivityPub.uri_from_object(content['object']))&.activity_pubs&.find_each(&:remove!)
|
object = ActivityPub::Object.find_by(uri: ActivityPub.uri_from_object(content['object']))
|
||||||
|
|
||||||
activity_pub.remove!
|
if object
|
||||||
|
object.activity_pubs.find_each do |activity_pub|
|
||||||
|
activity_pub.remove! if activity_pub.may_remove?
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
activity_pub.remove! if activity_pub.may_remove?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,4 +14,4 @@
|
||||||
- moderation_queue.each do |activity_pub|
|
- moderation_queue.each do |activity_pub|
|
||||||
-# cache [activity_pub, activity_pub.object, activity_pub.actor] do
|
-# cache [activity_pub, activity_pub.object, activity_pub.actor] do
|
||||||
%hr
|
%hr
|
||||||
= render 'comment', comment: activity_pub.object.content, profile: activity_pub.actor.content, activity_pub: activity_pub, form_id: form_id
|
= render 'moderation_queue/comment', comment: activity_pub.object.content, profile: activity_pub.actor.content, activity_pub: activity_pub, form_id: form_id
|
||||||
|
|
Loading…
Reference in a new issue