Fix commenting on mobile to Diaspora

This commit is contained in:
Michael 2021-05-31 19:39:50 +00:00
parent 8bdfdc7d52
commit be7a01f086
3 changed files with 8 additions and 15 deletions

View file

@ -1060,7 +1060,14 @@ class Item
Post\Content::insert($item['uri-id'], $item);
}
// Diaspora signature
// Create Diaspora signature
if ($item['origin'] && empty($item['diaspora_signed_text'])) {
$signed = Diaspora::createCommentSignature($uid, $item);
if (!empty($signed)) {
$item['diaspora_signed_text'] = json_encode($signed);
}
}
if (!empty($item['diaspora_signed_text'])) {
DBA::replace('diaspora-interaction', ['uri-id' => $item['uri-id'], 'interaction' => $item['diaspora_signed_text']]);
}