|
|
@ -19,10 +19,14 @@ class Subscribe extends Base |
|
|
|
{ |
|
|
|
$json = requestURL(MOVIM_API.'servers', 3, false, true); |
|
|
|
$json = json_decode($json); |
|
|
|
$this->view->assign('config', Configuration::get()); |
|
|
|
$config = Configuration::get(); |
|
|
|
$this->view->assign('config', $config); |
|
|
|
|
|
|
|
if (is_object($json) && $json->status == 200) { |
|
|
|
$this->view->assign('servers', $json->servers); |
|
|
|
$this->view->assign('servers', array_filter((array)$json->servers, |
|
|
|
function ($server) use ($config) { |
|
|
|
return empty($config->xmppwhitelist) || in_array($server->domain, $config->xmppwhitelist); |
|
|
|
})); |
|
|
|
} |
|
|
|
} |
|
|
|
} |