From cd3f2f63d6dc11dedc8809a4217cd194f6b9631c Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 12 Apr 2023 05:48:38 +0000 Subject: [PATCH] Replace the Diaspora signature upon update --- src/Model/Item.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index aa33418599..d7de9ca496 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -244,7 +244,15 @@ class Item DBA::close($items); foreach ($notify_items as $notify_item) { - $post = Post::selectFirst(['uri-id', 'uid'], ['id' => $notify_item]); + $post = Post::selectFirst([], ['id' => $notify_item]); + + if ($post['gravity'] != self::GRAVITY_PARENT) { + $signed = Diaspora::createCommentSignature($post); + if (!empty($signed)) { + DBA::replace('diaspora-interaction', ['uri-id' => $post['uri-id'], 'interaction' => json_encode($signed)]); + } + } + Worker::add(Worker::PRIORITY_HIGH, 'Notifier', Delivery::POST, (int)$post['uri-id'], (int)$post['uid']); } -- 2.39.5