Replace the Diaspora signature upon update

This commit is contained in:
Michael 2023-04-12 05:48:38 +00:00
parent 4d4c8c634c
commit cd3f2f63d6
1 changed files with 9 additions and 1 deletions

View 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']);
}