From f40fedcad69d23b33e8688c6230bc43cfc4f98dd Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 15 May 2020 12:40:06 +0000 Subject: rewriting the author for legacy compatibility only if author is from this site and add comment. --- Zotlabs/Daemon/Notifier.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Daemon') diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index bd5f8ee2c..6e4038fd7 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -734,6 +734,8 @@ class Notifier { } } + + // remove this after most hubs have updated to version 5.0 if(stripos($hub['site_project'], 'hubzilla') !== false && version_compare($hub['site_version'], '4.7.3', '<=')) { if($encoded_item['type'] === 'mail') { $encoded_item['from']['network'] = 'zot'; @@ -742,8 +744,10 @@ class Notifier { else { $encoded_item['owner']['network'] = 'zot'; $encoded_item['owner']['guid_sig'] = str_replace('sha256.', '', $encoded_item['owner']['guid_sig']); - //$encoded_item['author']['network'] = 'zot'; - //$encoded_item['author']['guid_sig'] = str_replace('sha256.', '', $encoded_item['author']['guid_sig']); + if(strpos($encoded_item['author']['url'], z_root()) === 0) { + $encoded_item['author']['network'] = 'zot'; + $encoded_item['author']['guid_sig'] = str_replace('sha256.', '', $encoded_item['author']['guid_sig']); + } } } -- cgit v1.2.3