1
0
Fork 0

Merge pull request #6037 from annando/ap-signatures

Diaspora signatures are now stored and transmitted correctly
This commit is contained in:
Hypolite Petovan 2018-10-27 13:49:19 -04:00 committed by GitHub
commit 933f43218a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 29 additions and 23 deletions

View file

@ -726,6 +726,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) {
@ -764,9 +769,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([