1
0
Fork 0

Diaspora signatures are now stored and transmitted correctly

This commit is contained in:
Michael 2018-10-27 14:35:22 +00:00
commit 4831688dc0
6 changed files with 29 additions and 23 deletions

View file

@ -727,6 +727,11 @@ function item_post(App $a) {
unset($datarray['self']);
unset($datarray['api_source']);
$signed = Diaspora::createCommentSignature($author, $datarray);
if (!empty($signed)) {
$datarray['diaspora_signed_text'] = json_encode($signed);
}
$post_id = Item::insert($datarray);
if (!$post_id) {
@ -765,9 +770,6 @@ function item_post(App $a) {
'parent_uri' => $parent_item['uri']
]);
}
// Store the comment signature information in case we need to relay to Diaspora
Diaspora::storeCommentSignature($datarray, $author, ($self ? $user['prvkey'] : false), $post_id);
} else {
if (($contact_record != $author) && !count($forum_contact)) {
notification([