mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-21 20:35:21 +00:00
missed a fix
This commit is contained in:
parent
c4ea93e6a6
commit
09f137233b
3 changed files with 13 additions and 2 deletions
|
@ -1509,12 +1509,14 @@ class Activity {
|
|||
$s['created'] = datetime_convert('UTC','UTC',$act->data['published']);
|
||||
}
|
||||
|
||||
$obj_actor = ((isset($act->obj['actor'])) ? $act->obj['actor'] : $act->get_actor('attributedTo', $act->obj));
|
||||
|
||||
// This needs better formatting with proper names
|
||||
if($act->type === 'Like') {
|
||||
$content['content'] = sprintf('%1$s Likes %2$s\'s %3$s',$act->actor['id'],$act->obj['actor']['id'],$act->obj['type']) . "\n\n" . $content['content'];
|
||||
$content['content'] = sprintf('@{%1$s} Likes @{%2$s}\'s %3$s',$act->actor['id'],$obj_actor['id'],$act->obj['type']) . "\n\n" . $content['content'];
|
||||
}
|
||||
if($act->type === 'Dislike') {
|
||||
$content['content'] = sprintf('%1$s Doesn\'t like %2$s\'s %3$s',$act->actor['id'],$act->obj['actor']['id'],$act->obj['type']) . "\n\n" . $content['content'];
|
||||
$content['content'] = sprintf('@{%1$s} Doesn\'t like @{%2$s}\'s %3$s',$act->actor['id'],$obj_actor['id'],$act->obj['type']) . "\n\n" . $content['content'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -98,6 +98,7 @@ class Magic extends \Zotlabs\Web\Controller {
|
|||
|
||||
$headers = [];
|
||||
$headers['Accept'] = 'application/x-zot+json' ;
|
||||
$headers['Content-Type'] = 'application/x-zot+json' ;
|
||||
$headers['X-Open-Web-Auth'] = random_string();
|
||||
$headers['Digest'] = HTTPSig::generate_digest_header($data);
|
||||
$headers['Host'] = $parsed['host'];
|
||||
|
|
|
@ -71,6 +71,12 @@ class Finger {
|
|||
$url = 'https://' . $host;
|
||||
}
|
||||
|
||||
$m = parse_url($url);
|
||||
|
||||
if($m) {
|
||||
$parsed_host = $m['host'];
|
||||
}
|
||||
|
||||
$rhs = '/.well-known/zot-info';
|
||||
$https = ((strpos($url,'https://') === 0) ? true : false);
|
||||
|
||||
|
@ -88,6 +94,8 @@ class Finger {
|
|||
$headers = [];
|
||||
$headers['X-Zot-Channel'] = $channel['channel_address'] . '@' . \App::get_hostname();
|
||||
$headers['X-Zot-Nonce'] = random_string();
|
||||
$headers['Host'] = $parsed_host;
|
||||
|
||||
$xhead = \Zotlabs\Web\HTTPSig::create_sig('',$headers,$channel['channel_prvkey'],
|
||||
'acct:' . $channel['channel_address'] . '@' . \App::get_hostname(),false);
|
||||
|
||||
|
|
Loading…
Reference in a new issue