Simplified signature creation

This commit is contained in:
Michael 2021-08-05 08:42:46 +00:00
parent a26a2a0228
commit 835152d418
2 changed files with 14 additions and 9 deletions

View file

@ -1061,13 +1061,7 @@ class Item
// Create Diaspora signature
if ($item['origin'] && empty($item['diaspora_signed_text']) && ($item['gravity'] != GRAVITY_PARENT)) {
if ($uid == 0) {
$sender_contact = Contact::getById($item['contact-id'], ['uid']);
$sender_uid = $sender_contact['uid'];
} else {
$sender_uid = $uid;
}
$signed = Diaspora::createCommentSignature($sender_uid, $item);
$signed = Diaspora::createCommentSignature($item);
if (!empty($signed)) {
$item['diaspora_signed_text'] = json_encode($signed);
}