aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Wfinger.php2
-rw-r--r--Zotlabs/Module/Xrd.php2
-rw-r--r--include/feedutils.php21
3 files changed, 22 insertions, 3 deletions
diff --git a/Zotlabs/Module/Wfinger.php b/Zotlabs/Module/Wfinger.php
index 9623a676b..07a7b7735 100644
--- a/Zotlabs/Module/Wfinger.php
+++ b/Zotlabs/Module/Wfinger.php
@@ -117,7 +117,7 @@ class Wfinger extends \Zotlabs\Web\Controller {
[
'rel' => 'http://ostatus.org/schema/1.0/subscribe',
- 'template' => z_root() . '/follow/url={uri}',
+ 'template' => z_root() . '/follow?f=&url={uri}',
],
[
diff --git a/Zotlabs/Module/Xrd.php b/Zotlabs/Module/Xrd.php
index 9630e9ab4..64e5042cb 100644
--- a/Zotlabs/Module/Xrd.php
+++ b/Zotlabs/Module/Xrd.php
@@ -57,7 +57,7 @@ class Xrd extends \Zotlabs\Web\Controller {
'$poco_url' => z_root() . '/poco/' . $r[0]['channel_address'],
'$photo' => z_root() . '/photo/profile/l/' . $r[0]['channel_id'],
'$modexp' => 'data:application/magic-public-key,' . $salmon_key,
- '$subscribe' => z_root() . '/follow?url={uri}',
+ '$subscribe' => z_root() . '/follow?f=&url={uri}',
));
diff --git a/include/feedutils.php b/include/feedutils.php
index b1fcce9d3..6ee53e2f6 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -408,8 +408,11 @@ function get_atom_elements($feed, $item, &$author) {
$ostatus_protocol = (($ostatus_conversation) ? true : false);
$mastodon = (($item->get_item_tags('http://mastodon.social/schema/1.0','scope')) ? true : false);
- if($mastodon)
+ if($mastodon) {
$ostatus_protocol = true;
+ if(($mastodon[0]['data']) && ($mastodon[0]['data'] !== 'public'))
+ $res['item_private'] = 1;
+ }
$apps = $item->get_item_tags(NAMESPACE_STATUSNET, 'notice_info');
if($apps && $apps[0]['attribs']['']['source']) {
@@ -1024,6 +1027,14 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
if(! $datarray['mid'])
continue;
+ // A Mastodon privacy tag has been found. We cannot send private comments
+ // through the OStatus protocol, so block commenting.
+
+ if(array_key_exists('item_private',$datarray) && intval($datarray['item_private'])) {
+ $datarray['public_policy'] = 'specific';
+ $datarray['comment_policy'] = 'none';
+ }
+
if($contact['xchan_network'] === 'rss') {
$datarray['public_policy'] = 'specific';
$datarray['comment_policy'] = 'none';
@@ -1220,6 +1231,14 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
if(! $datarray['mid'])
continue;
+ // A Mastodon privacy tag has been found. We cannot send private comments
+ // through the OStatus protocol, so block commenting.
+
+ if(array_key_exists('item_private',$datarray) && intval($datarray['item_private'])) {
+ $datarray['public_policy'] = 'specific';
+ $datarray['comment_policy'] = 'none';
+ }
+
if($contact['xchan_network'] === 'rss') {
$datarray['public_policy'] = 'specific';
$datarray['comment_policy'] = 'none';