From: Evan Prodromou Date: Wed, 1 Jul 2009 16:09:41 +0000 (-0400) Subject: better transport choices when xmpp is disabled X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=557418bc1e4e9d8a06025910ad7be5f60557f71e;p=quix0rs-gnu-social.git better transport choices when xmpp is disabled --- diff --git a/lib/util.php b/lib/util.php index b1b4faa7e6..6563745161 100644 --- a/lib/util.php +++ b/lib/util.php @@ -869,17 +869,25 @@ function common_broadcast_notice($notice, $remote=false) function common_enqueue_notice($notice) { static $localTransports = array('omb', - 'public', 'twitter', 'facebook', 'ping'); - static $allTransports = array('sms', 'jabber'); + static $allTransports = array('sms'); $transports = $allTransports; + $xmpp = common_config('xmpp', 'enabled'); + + if ($xmpp) { + $transports[] = 'jabber'; + } + if ($notice->is_local == NOTICE_LOCAL_PUBLIC || $notice->is_local == NOTICE_LOCAL_NONPUBLIC) { $transports = array_merge($transports, $localTransports); + if ($xmpp) { + $transports[] = 'public'; + } } $qm = QueueManager::get();