aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-21 15:58:42 -0800
committerfriendica <info@friendica.com>2013-11-21 15:58:42 -0800
commitbe8a7e2de6326ea9fb16bebbafeaeaf6fa52a767 (patch)
treea36c541c0eda4a518f53a0c24cd8dcbda1dd2ce6
parentf896819c781807612318ad389ea5fe655926cc2a (diff)
downloadvolse-hubzilla-be8a7e2de6326ea9fb16bebbafeaeaf6fa52a767.tar.gz
volse-hubzilla-be8a7e2de6326ea9fb16bebbafeaeaf6fa52a767.tar.bz2
volse-hubzilla-be8a7e2de6326ea9fb16bebbafeaeaf6fa52a767.zip
this is necessary for any possibility of a federated future.
-rw-r--r--include/notifier.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/notifier.php b/include/notifier.php
index 2ca3531d6..0868ac77e 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -382,12 +382,27 @@ function notifier_run($argv, $argc){
$env_recips = (($private) ? array() : null);
- $details = q("select xchan_hash, xchan_addr, xchan_guid, xchan_guid_sig from xchan where xchan_hash in (" . implode(',',$recipients) . ")");
+ $details = q("select xchan_hash, xchan_instance_url, xchan_addr, xchan_guid, xchan_guid_sig from xchan where xchan_hash in (" . implode(',',$recipients) . ")");
$recip_list = array();
if($details) {
foreach($details as $d) {
+
+ // If the recipient is federated from a traditional network they won't be able to
+ // handle nomadic identity. If we're publishing from a site that they aren't
+ // directly connected with, ignore them.
+
+ // FIXME: make sure we run through a notifier loop on the hub they're connected
+ // with if this post comes in from a different hub - so that we will deliver to them.
+
+ // On the down side, these channels will stop working if the hub they connected with
+ // goes down permanently, as they are (doh) not nomadic.
+
+ if(($d['xchan_instance_url']) && ($d['xchan_instance_url'] != z_root()))
+ continue;
+
+
$recip_list[] = $d['xchan_addr'] . ' (' . $d['xchan_hash'] . ')';
if($private)
$env_recips[] = array('guid' => $d['xchan_guid'],'guid_sig' => $d['xchan_guid_sig']);