From e80191d4cdadd38978579edf17bf8188d7729c4e Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 3 Nov 2022 13:09:11 +0000 Subject: fix regression --- Zotlabs/Lib/Libsync.php | 8 ++++++-- Zotlabs/Lib/Libzot.php | 2 +- Zotlabs/Module/Connections.php | 2 +- Zotlabs/Module/Dreport.php | 6 ++++-- 4 files changed, 12 insertions(+), 6 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php index 914969d97..9851ce52a 100644 --- a/Zotlabs/Lib/Libsync.php +++ b/Zotlabs/Lib/Libsync.php @@ -202,6 +202,8 @@ class Libsync { $channel = $r[0]; + $mid = 'sync'; + $DR->set_name($channel['channel_name'] . ' <' . channel_reddress($channel) . '>'); $max_friends = service_class_fetch($channel['channel_id'], 'total_channels'); @@ -293,8 +295,10 @@ class Libsync { if (array_key_exists('event_item', $arr) && $arr['event_item']) sync_items($channel, $arr['event_item'], ((array_key_exists('relocate', $arr)) ? $arr['relocate'] : null)); - if (array_key_exists('item', $arr) && $arr['item']) + if (array_key_exists('item', $arr) && $arr['item']) { sync_items($channel, $arr['item'], ((array_key_exists('relocate', $arr)) ? $arr['relocate'] : null)); + $mid = $arr['item']['mid'] . '#sync'; + } // deprecated, maintaining for a few months for upward compatibility // this should sync webpages, but the logic is a bit subtle @@ -740,7 +744,7 @@ class Libsync { */ call_hooks('process_channel_sync_delivery', $addon); - $DR = new DReport(z_root(), $d, $d, 'sync', 'channel sync delivered'); + $DR = new DReport(z_root(), $d, $d, $mid, 'channel sync processed'); $DR->set_name($channel['channel_name'] . ' <' . channel_reddress($channel) . '>'); diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index 7adc56ae6..b0d33e055 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -1148,7 +1148,7 @@ class Libzot { $result = null; - hz_syslog('Notify: ' . print_r($env, true), LOGGER_DATA, LOG_DEBUG); + logger('Notify: ' . print_r($env, true), LOGGER_DATA, LOG_DEBUG); if (!is_array($env)) { logger('decode error'); diff --git a/Zotlabs/Module/Connections.php b/Zotlabs/Module/Connections.php index 0101bf8a8..ea30b9b9e 100644 --- a/Zotlabs/Module/Connections.php +++ b/Zotlabs/Module/Connections.php @@ -357,7 +357,7 @@ class Connections extends \Zotlabs\Web\Controller { 'oneway' => $oneway, 'perminfo' => $perminfo, 'connect' => (intval($rr['abook_not_here']) ? t('Connect') : ''), - 'follow' => z_root() . '/follow/?f=&url=' . urlencode($rr['xchan_hash']) . '&interactive=0', + 'follow' => z_root() . '/follow/?f=&url=' . urlencode($rr['xchan_hash']) . '&interactive=1', 'connect_hover' => t('Connect at this location'), 'role' => $roles_dict[$rr['abook_role']] ?? '', 'pending' => intval($rr['abook_pending']) diff --git a/Zotlabs/Module/Dreport.php b/Zotlabs/Module/Dreport.php index 759e1acb4..f5ad80eef 100644 --- a/Zotlabs/Module/Dreport.php +++ b/Zotlabs/Module/Dreport.php @@ -56,10 +56,12 @@ class Dreport extends \Zotlabs\Web\Controller { return; } - $r = q("select * from dreport where dreport_xchan = '%s' and (dreport_mid = '%s' or dreport_mid = '%s')", + $r = q("select * from dreport where dreport_xchan = '%s' and (dreport_mid = '%s' or dreport_mid = '%s' or dreport_mid = '%s' or dreport_mid = '%s')", dbesc($channel['channel_hash']), dbesc($mid), - dbesc(str_replace('/item/', '/activity/', $mid)) + dbesc($mid . '#sync'), + dbesc(str_replace('/item/', '/activity/', $mid)), + dbesc(str_replace('/item/', '/activity/', $mid) . '#sync') ); if(! $r) { -- cgit v1.2.3