mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 05:35:12 +00:00
Merge branch 'dev' of ../p3 into dev
This commit is contained in:
commit
0c6f176138
3 changed files with 13 additions and 7 deletions
|
@ -1622,7 +1622,7 @@ class Activity {
|
|||
|
||||
$ret['discoverable'] = ((1 - intval($p['xchan_hidden'])) ? true : false);
|
||||
$ret['publicKey'] = [
|
||||
'id' => $p['xchan_url'],
|
||||
'id' => $p['xchan_url'] . '?operation=getkey',
|
||||
'owner' => $p['xchan_url'],
|
||||
'publicKeyPem' => $p['xchan_pubkey']
|
||||
];
|
||||
|
|
|
@ -51,7 +51,7 @@ class ActivityPub {
|
|||
if ($purge_all) {
|
||||
|
||||
$ti = [
|
||||
'id' => channel_url($arr['channel']) . '#delete',
|
||||
'id' => channel_url($arr['channel']) . '?operation=delete',
|
||||
'actor' => channel_url($arr['channel']),
|
||||
'type' => 'Delete',
|
||||
'object' => channel_url($arr['channel']),
|
||||
|
@ -416,7 +416,7 @@ class ActivityPub {
|
|||
Activity::ap_schema()
|
||||
]],
|
||||
[
|
||||
'id' => z_root() . '/follow/' . $recip[0]['abook_id'] . '/' . md5($orig_activity) . '#reject',
|
||||
'id' => z_root() . '/follow/' . $recip[0]['abook_id'] . '/' . md5($orig_activity) . '?operation=reject',
|
||||
'type' => 'Reject',
|
||||
'actor' => $p,
|
||||
'object' => [
|
||||
|
@ -440,7 +440,7 @@ class ActivityPub {
|
|||
Activity::ap_schema()
|
||||
]],
|
||||
[
|
||||
'id' => z_root() . '/follow/' . $recip[0]['abook_id'] . (($orig_activity) ? '/' . md5($orig_activity) : EMPTY_STR) . '#Undo',
|
||||
'id' => z_root() . '/follow/' . $recip[0]['abook_id'] . (($orig_activity) ? '/' . md5($orig_activity) : EMPTY_STR) . '?operation=unfollow',
|
||||
'type' => 'Undo',
|
||||
'actor' => $p,
|
||||
'object' => [
|
||||
|
|
|
@ -1854,16 +1854,22 @@ function is_https_request() {
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Given a URL, return everything after the host portion.
|
||||
* @brief Given a URL, return everything after the host portion, but exclude any fragments.
|
||||
* example https://foobar.com/gravy?g=5&y=6
|
||||
* returns /gravy?g=5&y=6
|
||||
* example https:://foobar.com/gravy?g=5&y=6#fragment
|
||||
* also returns /gravy?g=5&y=6
|
||||
* result always returns the leading slash
|
||||
*/
|
||||
|
||||
function get_request_string($url) {
|
||||
|
||||
$a = explode('/',$url,4);
|
||||
return '/' . ((count($a) > 3) ? $a[3] : EMPTY_STR);
|
||||
$m = parse_url($url);
|
||||
if ($m) {
|
||||
return ( (isset($m['path']) ? $m['path'] : '/' ) . (isset($m['query']) ? '?' . $m['query'] : EMPTY_STR) );
|
||||
}
|
||||
|
||||
return EMPTY_STR;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue