aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <redmatrix@redmatrix.me>2015-04-23 21:13:59 -0700
committerfriendica <redmatrix@redmatrix.me>2015-04-23 21:13:59 -0700
commit5ac177391bf7f8f13da5089b907829cf6f77650b (patch)
tree72a44bae38806c6acb3f71952cd6f8bb272e46df /include
parent4759fa662b38253a01fa27b57ac336cbfb12aa47 (diff)
downloadvolse-hubzilla-5ac177391bf7f8f13da5089b907829cf6f77650b.tar.gz
volse-hubzilla-5ac177391bf7f8f13da5089b907829cf6f77650b.tar.bz2
volse-hubzilla-5ac177391bf7f8f13da5089b907829cf6f77650b.zip
disconnect
Diffstat (limited to 'include')
-rw-r--r--include/notifier.php22
1 files changed, 15 insertions, 7 deletions
diff --git a/include/notifier.php b/include/notifier.php
index bec18142a..b82fb41cc 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -343,6 +343,11 @@ function notifier_run($argv, $argc){
$deleted_item = true;
}
+ if(strpos($target_item['postopts'],'nodeliver') !== false) {
+ logger('notifier: target item is undeliverable', LOGGER_DEBUG);
+ return;
+ }
+
$unforwardable = ITEM_UNPUBLISHED|ITEM_DELAYED_PUBLISH|ITEM_WEBPAGE|ITEM_BUILDBLOCK|ITEM_PDL;
if($target_item['item_restrict'] & $unforwardable) {
logger('notifier: target item not forwardable: flags ' . $target_item['item_restrict'], LOGGER_DEBUG);
@@ -373,6 +378,12 @@ function notifier_run($argv, $argc){
if(! $r)
return;
+
+ if(strpos($r[0]['postopts'],'nodeliver') !== false) {
+ logger('notifier: target item is undeliverable', LOGGER_DEBUG);
+ return;
+ }
+
xchan_query($r);
$r = fetch_post_tags($r);
@@ -591,16 +602,13 @@ function notifier_run($argv, $argc){
foreach($dhubs as $hub) {
- if(defined('DIASPORA_RELIABILITY_EMULATION')) {
- $cointoss = mt_rand(0,2);
- if($cointoss == 2) {
+ if($hub['hubloc_network'] === 'diaspora' || $hub['hubloc_network'] === 'friendica-over-diaspora') {
+ if(! get_config('system','diaspora_enabled'))
continue;
- }
- }
+ // allow this to be set per message
- if($hub['hubloc_network'] === 'diaspora' || $hub['hubloc_network'] === 'friendica-over-diaspora') {
- if(! get_config('system','diaspora_enabled'))
+ if(strpos($target_item['postopts'],'nodspr') !== false)
continue;
require_once('include/diaspora.php');