From 40f6280c48e7b5720211dd801f0bfa851658fa44 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 19 Apr 2017 17:52:15 -0700 Subject: follow_from_feed issue when called from push --- include/feedutils.php | 2 +- include/follow.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/feedutils.php b/include/feedutils.php index 1865dfb27..0e6978d39 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -946,7 +946,7 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) { $datarray['author_xchan'] = ''; if(activity_match($datarray['verb'],ACTIVITY_FOLLOW) && $datarray['obj_type'] === ACTIVITY_OBJ_PERSON) { - $cb = array('item' => $datarray,'channel' => $importer, 'xchan' => null, 'author' => $author, 'caught' => false); + $cb = array('item' => $datarray,'channel' => $importer, 'xchan' => [ 'placeholder' => '' ], 'author' => $author, 'caught' => false); call_hooks('follow_from_feed',$cb); if($cb['caught']) { if($cb['return_code']) diff --git a/include/follow.php b/include/follow.php index 751d86db1..0d7c16aa3 100644 --- a/include/follow.php +++ b/include/follow.php @@ -49,7 +49,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) $arr = array('url' => $url, 'channel' => array()); - call_hooks('follow', $arr); + call_hooks('follow_init', $arr); if($arr['channel']['success']) $ret = $arr['channel']; -- cgit v1.2.3 From d9a48092e690f582585d939f5b193aedd4bcebfb Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 20 Apr 2017 21:26:36 -0700 Subject: typo --- include/feedutils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/feedutils.php b/include/feedutils.php index 0e6978d39..af382be44 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -63,7 +63,7 @@ function get_public_feed($channel, $params) { */ function get_feed_for($channel, $observer_hash, $params) { - if(! channel) + if(! $channel) http_status_exit(401); if($params['pages']) { -- cgit v1.2.3 From 0d9b6ebc360ba13e760124490ef350a9b9cf2d38 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 20 Apr 2017 21:30:29 -0700 Subject: Revert "typo" - wrong repo This reverts commit d9a48092e690f582585d939f5b193aedd4bcebfb. --- include/feedutils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/feedutils.php b/include/feedutils.php index af382be44..0e6978d39 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -63,7 +63,7 @@ function get_public_feed($channel, $params) { */ function get_feed_for($channel, $observer_hash, $params) { - if(! $channel) + if(! channel) http_status_exit(401); if($params['pages']) { -- cgit v1.2.3 From 1d19ea4a336156f8b99b97c4c987d1210aa41497 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 20 Apr 2017 21:31:44 -0700 Subject: typo - this time the correct repo --- include/feedutils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/feedutils.php b/include/feedutils.php index 0e6978d39..af382be44 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -63,7 +63,7 @@ function get_public_feed($channel, $params) { */ function get_feed_for($channel, $observer_hash, $params) { - if(! channel) + if(! $channel) http_status_exit(401); if($params['pages']) { -- cgit v1.2.3 From 42f5291f692965944076a5005b101fe409bb182c Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sat, 22 Apr 2017 23:15:00 -0700 Subject: if there is no site record, site_dead won't be 0, in a left join it will in fact be null. As long as it isn't 1, we should attempt delivery. --- Zotlabs/Daemon/Notifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index 48f1d2757..3afe1a5dc 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -480,7 +480,7 @@ class Notifier { // Let's reduce this to a set of hubs; checking that the site is not dead. $r = q("select hubloc.*, site.site_crypto from hubloc left join site on site_url = hubloc_url where hubloc_hash in (" . implode(',',$recipients) . ") - and hubloc_error = 0 and hubloc_deleted = 0 and site_dead = 0" + and hubloc_error = 0 and hubloc_deleted = 0 and ( site_dead = 0 OR site_dead is null ) " ); -- cgit v1.2.3 From b6be0e1b996840192ea50b864b260d4d4cefbbb2 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 23 Apr 2017 12:58:36 +0200 Subject: Revert "if there is no site record, site_dead won't be 0, in a left join it will in fact be null. As long as it isn't 1, we should attempt delivery." This reverts commit 42f5291f692965944076a5005b101fe409bb182c. --- Zotlabs/Daemon/Notifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index 3afe1a5dc..48f1d2757 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -480,7 +480,7 @@ class Notifier { // Let's reduce this to a set of hubs; checking that the site is not dead. $r = q("select hubloc.*, site.site_crypto from hubloc left join site on site_url = hubloc_url where hubloc_hash in (" . implode(',',$recipients) . ") - and hubloc_error = 0 and hubloc_deleted = 0 and ( site_dead = 0 OR site_dead is null ) " + and hubloc_error = 0 and hubloc_deleted = 0 and site_dead = 0" ); -- cgit v1.2.3 From ac12f923eacd3d9c268c30633b5f653a4d680799 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 23 Apr 2017 16:05:14 +0200 Subject: Revert "Revert "if there is no site record, site_dead won't be 0, in a left join it will in fact be null. As long as it isn't 1, we should attempt delivery."" This reverts commit b6be0e1b996840192ea50b864b260d4d4cefbbb2. --- Zotlabs/Daemon/Notifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index 48f1d2757..3afe1a5dc 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -480,7 +480,7 @@ class Notifier { // Let's reduce this to a set of hubs; checking that the site is not dead. $r = q("select hubloc.*, site.site_crypto from hubloc left join site on site_url = hubloc_url where hubloc_hash in (" . implode(',',$recipients) . ") - and hubloc_error = 0 and hubloc_deleted = 0 and site_dead = 0" + and hubloc_error = 0 and hubloc_deleted = 0 and ( site_dead = 0 OR site_dead is null ) " ); -- cgit v1.2.3 From bda9a833ba2511a36a569dd03991130e775c5ca7 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 23 Apr 2017 17:22:28 +0200 Subject: fix the query of last pullrequest --- Zotlabs/Daemon/Notifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index 3afe1a5dc..3e2f5fdcc 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -480,7 +480,7 @@ class Notifier { // Let's reduce this to a set of hubs; checking that the site is not dead. $r = q("select hubloc.*, site.site_crypto from hubloc left join site on site_url = hubloc_url where hubloc_hash in (" . implode(',',$recipients) . ") - and hubloc_error = 0 and hubloc_deleted = 0 and ( site_dead = 0 OR site_dead is null ) " + and hubloc_error = 0 and hubloc_deleted = 0 and ( site_dead = 0 OR site_dead = null ) " ); -- cgit v1.2.3 From 42d139ee82f9d442138b9f99e71485d18a86f52d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 24 Apr 2017 09:05:33 +0200 Subject: Revert "fix the query of last pullrequest" This reverts commit bda9a833ba2511a36a569dd03991130e775c5ca7. --- Zotlabs/Daemon/Notifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index 3e2f5fdcc..3afe1a5dc 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -480,7 +480,7 @@ class Notifier { // Let's reduce this to a set of hubs; checking that the site is not dead. $r = q("select hubloc.*, site.site_crypto from hubloc left join site on site_url = hubloc_url where hubloc_hash in (" . implode(',',$recipients) . ") - and hubloc_error = 0 and hubloc_deleted = 0 and ( site_dead = 0 OR site_dead = null ) " + and hubloc_error = 0 and hubloc_deleted = 0 and ( site_dead = 0 OR site_dead is null ) " ); -- cgit v1.2.3