From d559b4a2017e58c1dd24684c329327e935452e64 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 21 Nov 2020 10:21:14 +0000 Subject: deliver to local hub first --- Zotlabs/Daemon/Notifier.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index f24eab773..28c512d4a 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -640,9 +640,16 @@ class Notifier { } else { if(! in_array($hub['hubloc_url'],$urls)) { - $hublist[] = $hub['hubloc_host'] . ' ' . $hub['hubloc_network']; - $dhubs[] = $hub; - $urls[] = $hub['hubloc_url']; + if($hub['hubloc_url'] === z_root()) { + //deliver to local hub first + array_unshift($hublist, $hub['hubloc_host'] . ' ' . $hub['hubloc_network']); + array_unshift($dhubs, $hub); + } + else { + $hublist[] = $hub['hubloc_host'] . ' ' . $hub['hubloc_network']; + $dhubs[] = $hub; + } + $urls[] = $hub['hubloc_url']; } } } -- cgit v1.2.3