add conversation element and more logging

This commit is contained in:
zotlabs 2018-08-29 23:54:13 -07:00
parent c48aae55af
commit 62e2df4c96
2 changed files with 8 additions and 0 deletions

View file

@ -221,6 +221,13 @@ class Activity {
if($i['id'] != $i['parent']) {
$ret['inReplyTo'] = ((strpos($i['parent_mid'],'http') === 0) ? $i['parent_mid'] : z_root() . '/item/' . urlencode($i['parent_mid']));
$cnv = get_iconfig($i['parent'],'ostatus','conversation');
}
if(! $cnv) {
$cnv = get_iconfig($i,'ostatus','conversation');
}
if($cnv) {
$ret['conversation'] = $cnv;
}
if($i['mimetype'] === 'text/bbcode') {

View file

@ -236,6 +236,7 @@ class Queue {
$headers = [];
$headers['Content-Type'] = 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"' ;
$ret = $outq['outq_msg'];
logger('ActivityPub send: ' . $ret, LOGGER_DATA);
$headers['Digest'] = HTTPSig::generate_digest_header($ret);
$xhead = HTTPSig::create_sig($headers,$channel['channel_prvkey'],channel_url($channel));
$result = z_post_url($outq['outq_posturl'],$outq['outq_msg'],$retries,[ 'headers' => $xhead ]);