Create the Diaspora signature for the correct user
This commit is contained in:
parent
00327fd6b4
commit
c73130aa6b
|
@ -717,7 +717,7 @@ function conversation_add_children(array $parents, $block_authors, $order, $uid)
|
|||
$max_comments = DI::config()->get('system', 'max_display_comments', 1000);
|
||||
}
|
||||
|
||||
$params = ['order' => ['uri-id' => true]];
|
||||
$params = ['order' => ['uri-id' => true, 'uid' => true]];
|
||||
|
||||
$activities = [];
|
||||
$uriids = [];
|
||||
|
|
|
@ -1061,7 +1061,13 @@ class Item
|
|||
|
||||
// Create Diaspora signature
|
||||
if ($item['origin'] && empty($item['diaspora_signed_text']) && ($item['gravity'] != GRAVITY_PARENT)) {
|
||||
$signed = Diaspora::createCommentSignature($uid, $item);
|
||||
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);
|
||||
if (!empty($signed)) {
|
||||
$item['diaspora_signed_text'] = json_encode($signed);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue