]> git.mxchange.org Git - friendica.git/commitdiff
Replace the Diaspora signature upon update
authorMichael <heluecht@pirati.ca>
Wed, 12 Apr 2023 05:48:38 +0000 (05:48 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 12 Apr 2023 05:48:38 +0000 (05:48 +0000)
src/Model/Item.php

index aa334185993494ddc8d876e4efdf04ddc6007c41..d7de9ca49635fd3eae1286744edfb93eba69b721 100644 (file)
@@ -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']);
                }