5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 10:26:22 +00:00

Merge branch 'issue-15109-1' of https://0xacab.org/sutty/sutty into production.panel.sutty.nl

This commit is contained in:
Sutty 2024-03-06 20:22:29 +00:00
commit 14d8ce9af2
2 changed files with 9 additions and 3 deletions

View file

@ -14,9 +14,15 @@ class ActivityPub
# @see {https://docs.joinmastodon.org/spec/security/#ld}
def update_activity_pub_state!
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

View file

@ -14,4 +14,4 @@
- moderation_queue.each do |activity_pub|
-# cache [activity_pub, activity_pub.object, activity_pub.actor] do
%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