forked from GNUsocial/gnu-social
better transport choices when xmpp is disabled
This commit is contained in:
parent
887d35cfc8
commit
557418bc1e
12
lib/util.php
12
lib/util.php
@ -869,17 +869,25 @@ function common_broadcast_notice($notice, $remote=false)
|
|||||||
function common_enqueue_notice($notice)
|
function common_enqueue_notice($notice)
|
||||||
{
|
{
|
||||||
static $localTransports = array('omb',
|
static $localTransports = array('omb',
|
||||||
'public',
|
|
||||||
'twitter',
|
'twitter',
|
||||||
'facebook',
|
'facebook',
|
||||||
'ping');
|
'ping');
|
||||||
static $allTransports = array('sms', 'jabber');
|
static $allTransports = array('sms');
|
||||||
|
|
||||||
$transports = $allTransports;
|
$transports = $allTransports;
|
||||||
|
|
||||||
|
$xmpp = common_config('xmpp', 'enabled');
|
||||||
|
|
||||||
|
if ($xmpp) {
|
||||||
|
$transports[] = 'jabber';
|
||||||
|
}
|
||||||
|
|
||||||
if ($notice->is_local == NOTICE_LOCAL_PUBLIC ||
|
if ($notice->is_local == NOTICE_LOCAL_PUBLIC ||
|
||||||
$notice->is_local == NOTICE_LOCAL_NONPUBLIC) {
|
$notice->is_local == NOTICE_LOCAL_NONPUBLIC) {
|
||||||
$transports = array_merge($transports, $localTransports);
|
$transports = array_merge($transports, $localTransports);
|
||||||
|
if ($xmpp) {
|
||||||
|
$transports[] = 'public';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$qm = QueueManager::get();
|
$qm = QueueManager::get();
|
||||||
|
Loading…
Reference in New Issue
Block a user