]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
better transport choices when xmpp is disabled
authorEvan Prodromou <evan@controlyourself.ca>
Wed, 1 Jul 2009 16:09:41 +0000 (12:09 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Wed, 1 Jul 2009 16:09:41 +0000 (12:09 -0400)
lib/util.php

index b1b4faa7e6788baf1e52422ae8337b63af0907d7..656374516182ba15d5faacec5a5860b19fad78f1 100644 (file)
@@ -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();