diff options
author | Mario <mario@mariovavti.com> | 2020-05-15 12:40:06 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-05-15 12:40:06 +0000 |
commit | f40fedcad69d23b33e8688c6230bc43cfc4f98dd (patch) | |
tree | e105622535155cd5a6db3fdf1ff7e477d792962a | |
parent | b4973ede4443aea7e77e112f2fd031f5541ea3d3 (diff) | |
download | volse-hubzilla-f40fedcad69d23b33e8688c6230bc43cfc4f98dd.tar.gz volse-hubzilla-f40fedcad69d23b33e8688c6230bc43cfc4f98dd.tar.bz2 volse-hubzilla-f40fedcad69d23b33e8688c6230bc43cfc4f98dd.zip |
rewriting the author for legacy compatibility only if author is from this site and add comment.
-rw-r--r-- | Zotlabs/Daemon/Notifier.php | 8 |
1 files changed, 6 insertions, 2 deletions
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']); + } } } |