diff options
author | zotlabs <mike@macgirvin.com> | 2019-06-28 16:25:00 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-06-28 16:25:00 -0700 |
commit | d022e1accec75090e3170262db9248dfc7c991f8 (patch) | |
tree | 1206ad47b5c95af999423174552cf4bb3ddea298 | |
parent | 98100520eba567138799997506027daa10063f55 (diff) | |
parent | 42526fc2dc3a25ab3bb3741bb55733370f630f49 (diff) | |
download | volse-hubzilla-d022e1accec75090e3170262db9248dfc7c991f8.tar.gz volse-hubzilla-d022e1accec75090e3170262db9248dfc7c991f8.tar.bz2 volse-hubzilla-d022e1accec75090e3170262db9248dfc7c991f8.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
-rw-r--r-- | Zotlabs/Lib/Activity.php | 13 | ||||
-rw-r--r-- | Zotlabs/Module/Ping.php | 3 | ||||
-rw-r--r-- | Zotlabs/Zot6/Receiver.php | 1 | ||||
-rw-r--r-- | vendor/composer/autoload_classmap.php | 1 | ||||
-rw-r--r-- | vendor/composer/autoload_static.php | 1 |
5 files changed, 8 insertions, 11 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index f974d215b..c70d5f4dc 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -1863,8 +1863,9 @@ class Activity { // This is not part of the activitypub protocol - we might change this to show all public posts in pubstream at some point. $pubstream = ((is_array($act->obj) && array_key_exists('to', $act->obj) && in_array(ACTIVITY_PUBLIC_INBOX, $act->obj['to'])) ? true : false); + $is_parent = (($item['parent_mid'] && $item['parent_mid'] === $item['mid']) ? true : false); - if(! perm_is_allowed($channel['channel_id'],$observer_hash,'send_stream') && ! ($is_sys_channel && $pubstream)) { + if($is_parent && (! perm_is_allowed($channel['channel_id'],$observer_hash,'send_stream') && ! ($is_sys_channel && $pubstream))) { logger('no permission'); return; } @@ -1920,9 +1921,7 @@ class Activity { set_iconfig($item,'activitypub','recips',$act->raw_recips); - $parent = (($item['parent_mid'] && $item['parent_mid'] === $item['mid']) ? true : false); - - if(! $parent) { + if(! $is_parent) { $p = q("select parent_mid from item where mid = '%s' and uid = %d limit 1", dbesc($item['parent_mid']), intval($item['uid']) @@ -1980,7 +1979,7 @@ class Activity { } if(is_array($x) && $x['item_id']) { - if($parent) { + if($is_parent) { if($item['owner_xchan'] === $channel['channel_hash']) { // We are the owner of this conversation, so send all received comments back downstream Master::Summon(array('Notifier','comment-import',$x['item_id'])); @@ -2020,8 +2019,8 @@ class Activity { } $replies = null; - if(isset($n['replies']['first']['items'])) { - $replies = $n['replies']['first']['items']; + if(isset($a->obj['replies']['first']['items'])) { + $replies = $a->obj['replies']['first']['items']; // we already have this one array_diff($replies, [$current_item['mid']]); } diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php index 3dabe0f7b..6e8042eaf 100644 --- a/Zotlabs/Module/Ping.php +++ b/Zotlabs/Module/Ping.php @@ -282,8 +282,8 @@ class Ping extends \Zotlabs\Web\Controller { if(strpos($message, $tt['xname']) === 0) $message = substr($message, strlen($tt['xname']) + 1); - $mid = basename($tt['link']); + $mid = ((strpos($mid, 'b64.') === 0) ? @base64url_decode(substr($mid, 4)) : $mid); if(in_array($tt['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) { // we need the thread parent @@ -291,7 +291,6 @@ class Ping extends \Zotlabs\Web\Controller { dbesc($mid), intval(local_channel()) ); - $b64mid = ((strpos($r[0]['thr_parent'], 'b64.') === 0) ? $r[0]['thr_parent'] : 'b64.' . base64url_encode($r[0]['thr_parent'])); } else { diff --git a/Zotlabs/Zot6/Receiver.php b/Zotlabs/Zot6/Receiver.php index ed7c33b3a..9e70ab318 100644 --- a/Zotlabs/Zot6/Receiver.php +++ b/Zotlabs/Zot6/Receiver.php @@ -4,6 +4,7 @@ namespace Zotlabs\Zot6; use Zotlabs\Lib\Config; use Zotlabs\Lib\Libzot; +use Zotlabs\Web\HTTPSig; class Receiver { diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index a29d9226b..c006debcd 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -1431,7 +1431,6 @@ return array( 'Zotlabs\\Widget\\Wiki_pages' => $baseDir . '/Zotlabs/Widget/Wiki_pages.php', 'Zotlabs\\Widget\\Zcard' => $baseDir . '/Zotlabs/Widget/Zcard.php', 'Zotlabs\\Zot6\\Finger' => $baseDir . '/Zotlabs/Zot6/Finger.php', - 'Zotlabs\\Zot6\\HTTPSig' => $baseDir . '/Zotlabs/Zot6/HTTPSig.php', 'Zotlabs\\Zot6\\IHandler' => $baseDir . '/Zotlabs/Zot6/IHandler.php', 'Zotlabs\\Zot6\\Receiver' => $baseDir . '/Zotlabs/Zot6/Receiver.php', 'Zotlabs\\Zot6\\Zot6Handler' => $baseDir . '/Zotlabs/Zot6/Zot6Handler.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 4f5b26949..2c9c7dd96 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -1599,7 +1599,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d 'Zotlabs\\Widget\\Wiki_pages' => __DIR__ . '/../..' . '/Zotlabs/Widget/Wiki_pages.php', 'Zotlabs\\Widget\\Zcard' => __DIR__ . '/../..' . '/Zotlabs/Widget/Zcard.php', 'Zotlabs\\Zot6\\Finger' => __DIR__ . '/../..' . '/Zotlabs/Zot6/Finger.php', - 'Zotlabs\\Zot6\\HTTPSig' => __DIR__ . '/../..' . '/Zotlabs/Zot6/HTTPSig.php', 'Zotlabs\\Zot6\\IHandler' => __DIR__ . '/../..' . '/Zotlabs/Zot6/IHandler.php', 'Zotlabs\\Zot6\\Receiver' => __DIR__ . '/../..' . '/Zotlabs/Zot6/Receiver.php', 'Zotlabs\\Zot6\\Zot6Handler' => __DIR__ . '/../..' . '/Zotlabs/Zot6/Zot6Handler.php', |