*/
use Friendica\App;
-use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
// set standard configuration
$info_text = DI::config()->get("jappixmini", "infotext");
if (!$info_text)
- Config::set("jappixmini", "infotext", "To get the chat working, you need to know a BOSH host which works with your Jabber account. " .
+ DI::config()->set("jappixmini", "infotext", "To get the chat working, you need to know a BOSH host which works with your Jabber account. " .
"An example of a BOSH server that works for all accounts is https://bind.jappix.com/, but keep " .
"in mind that the BOSH server can read along all chat messages. If you know that your Jabber " .
"server also provides an own BOSH server, it is much better to use this one!"
$bosh_proxy = DI::config()->get("jappixmini", "bosh_proxy");
if ($bosh_proxy === "") {
- Config::set("jappixmini", "bosh_proxy", "1");
+ DI::config()->set("jappixmini", "bosh_proxy", "1");
}
// set addon version so that safe updates are possible later
$addon_version = DI::config()->get("jappixmini", "version");
if ($addon_version === "") {
- Config::set("jappixmini", "version", "1");
+ DI::config()->set("jappixmini", "version", "1");
}
}
$default_user = intval($_REQUEST['jappixmini-defaultuser']);
$bosh_address = $_REQUEST['jappixmini-address'];
$default_server = $_REQUEST['jappixmini-server'];
- Config::set("jappixmini", "infotext", $info_text);
- Config::set("jappixmini", "bosh_proxy", $bosh_proxy);
- Config::set("jappixmini", "bosh_address", $bosh_address);
- Config::set("jappixmini", "default_server", $default_server);
- Config::set("jappixmini", "default_user", $default_user);
+ DI::config()->set("jappixmini", "infotext", $info_text);
+ DI::config()->set("jappixmini", "bosh_proxy", $bosh_proxy);
+ DI::config()->set("jappixmini", "bosh_address", $bosh_address);
+ DI::config()->set("jappixmini", "default_server", $default_server);
+ DI::config()->set("jappixmini", "default_user", $default_user);
}
}
function jappixmini_cron(App $a, $d)
{
// For autosubscribe/autoapprove, we need to maintain a list of jabber addresses of our contacts.
- Config::set("jappixmini", "last_cron_execution", $d);
+ DI::config()->set("jappixmini", "last_cron_execution", $d);
// go through list of users with jabber enabled
$users = q("SELECT `uid` FROM `pconfig` WHERE `cat`='jappixmini' AND (`k`='autosubscribe' OR `k`='autoapprove') AND `v`='1'");