diff options
-rw-r--r-- | include/items.php | 18 | ||||
-rw-r--r-- | include/poller.php | 4 | ||||
-rw-r--r-- | mod/pubsub.php | 4 | ||||
-rw-r--r-- | zot.txt | 12 |
4 files changed, 18 insertions, 20 deletions
diff --git a/include/items.php b/include/items.php index d907aeddb..c8dd4ca42 100644 --- a/include/items.php +++ b/include/items.php @@ -1081,7 +1081,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { * */ -function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $secure_feed = false) { +function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) { require_once('library/simplepie/simplepie.inc'); @@ -1249,7 +1249,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $secure_fee // process any deleted entries $del_entries = $feed->get_feed_tags(NAMESPACE_TOMB, 'deleted-entry'); - if(is_array($del_entries) && count($del_entries)) { + if(is_array($del_entries) && count($del_entries) && $pass != 2) { foreach($del_entries as $dentry) { $deleted = false; if(isset($dentry['attribs']['']['ref'])) { @@ -1341,7 +1341,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $secure_fee $parent_uri = $rawthread[0]['attribs']['']['ref']; } - if(($is_reply) && is_array($contact)) { + if(($is_reply) && is_array($contact) && $pass != 1) { // Have we seen it? If not, import it. @@ -1393,7 +1393,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $secure_fee } $force_parent = false; - if($contact['network'] === 'stat') { + if($contact['network'] === NETWORK_OSTATUS) { $force_parent = true; if(strlen($datarray['title'])) unset($datarray['title']); @@ -1405,7 +1405,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $secure_fee $datarray['last-child'] = 1; } - if(($contact['network'] === 'feed') || (! strlen($contact['notify']))) { + if(($contact['network'] === NETWORK_FEED) || (! strlen($contact['notify']))) { // one way feed - no remote comment ability $datarray['last-child'] = 0; } @@ -1438,6 +1438,8 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $secure_fee $datarray['author-avatar'] = $contact['thumb']; } + // special handling for events + if((x($datarray,'object-type')) && ($datarray['object-type'] === ACTIVITY_OBJ_EVENT)) { $ev = bbtoevent($datarray['body']); if(x($ev,'desc') && x($ev,'start')) { @@ -1511,18 +1513,16 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $secure_fee } - - if(! is_array($contact)) return; - if($contact['network'] === 'stat' || stristr($permalink,'twitter.com')) { + if($contact['network'] === NETWORK_OSTATUS || stristr($permalink,'twitter.com')) { if(strlen($datarray['title'])) unset($datarray['title']); $datarray['last-child'] = 1; } - if(($contact['network'] === 'feed') || (! strlen($contact['notify']))) { + if(($contact['network'] === NETWORK_FEED) || (! strlen($contact['notify']))) { // one way feed - no remote comment ability $datarray['last-child'] = 0; } diff --git a/include/poller.php b/include/poller.php index 89a3408ec..427f8887c 100644 --- a/include/poller.php +++ b/include/poller.php @@ -486,11 +486,11 @@ function poller_run($argv, $argc){ } - consume_feed($xml,$importer,$contact,$hub,1, true); + consume_feed($xml,$importer,$contact,$hub,1,1); // do it twice. Ensures that children of parents which may be later in the stream aren't tossed - consume_feed($xml,$importer,$contact,$hub,1); + consume_feed($xml,$importer,$contact,$hub,1,2); $hubmode = 'subscribe'; if($contact['network'] === NETWORK_DFRN || $contact['blocked'] || $contact['readonly']) diff --git a/mod/pubsub.php b/mod/pubsub.php index b2f006927..0c506db00 100644 --- a/mod/pubsub.php +++ b/mod/pubsub.php @@ -132,11 +132,11 @@ function pubsub_post(&$a) { require_once('include/items.php'); - consume_feed($xml,$importer,$contact,$feedhub,1); + consume_feed($xml,$importer,$contact,$feedhub,1,1); // do it a second time so that any children find their parents. - consume_feed($xml,$importer,$contact,$feedhub,1); + consume_feed($xml,$importer,$contact,$feedhub,1,2); hub_post_return(); @@ -132,10 +132,11 @@ contain commas. There MAY be any number of ASCII space characters between entries for legibility. Header lines are terminated with a linefeed character (ASCII 0x0A). -This specification provides the following foreign protocol address prefixes +This specification provides the following protocol address prefixes for use in Z-To: or Z-Bcc: elements: zot: - normal zot delivery using webfinger or LRDD resolvable address +dfrn: - legacy DFRN mode delivery using webfinger or LRDD resovable address ostatus: - normal OStatus delivery using webfinger or LRDD resovable address diaspora: - Diaspora network delivery using webfinger address facebook: - Facebook profile page URL @@ -253,15 +254,12 @@ This specification is subject to change. The current version which is in effect at a given site may be noted by XRD properties. The following properties MUST be present in the XRD providing the relevant endpoint: -<Property xmlns:zot="http://purl.og/zot/1.0" - type="http://purl.org/zot/1.0/version" - zot:version="1" /> +<Property type="http://purl.org/zot/1.0/version">1</Property> +<Property type="http://purl.org/zot/1.0/accept">application/atom+xml</Property> -<Property xmlns:zot="http://purl.og/zot/1.0" - type="http://purl.org/zot/1.0/accept" - zot:accept="application/atom+xml" /> Version is specified in this document and indicates the current revision. +Version is an increasing non-zero integer value. There are no minor versions. Implementations MAY provide compatibility to multiple incompatible versions by using this version indication. The "accept" indicates a range of document content types which may be enclosed in the underlying salmon magic envelope. |