/**
* Configures the XMPP Client
*/
private function configure()
{
/**
* It's actually really important that this class does not get defined in the __construct() function
* because it sets it's own signal handlers, and will take over ours leading to zombie processes after
* the parent gets killed.
*
* This needs to be instansiated AFTER this has forked into it's own process.
*/
$config = $this->getContainer()->get('config');
$this->client = new \JAXL(['jid' => $config['xmpp']['account']['jid'], 'pass' => $config['xmpp']['account']['password'], 'host' => $config['xmpp']['server']['host'], 'port' => $config['xmpp']['server']['port'], 'resource' => 'bot' . md5(time()), 'priv_dir' => sys_get_temp_dir() . '/.jaxl', 'force_tls' => $config['xmpp']['server']['ssl']['force_tls'], 'log_level' => JAXL_INFO, 'auth_type' => $config['xmpp']['server']['auth_type'], 'strict' => true, 'stream_context' => stream_context_create(['ssl' => ['verify_peer' => $config['xmpp']['server']['ssl']['verify_peer'], 'allow_self_signed' => $config['xmpp']['server']['ssl']['allow_self_signed'], 'verify_peer_name' => $config['xmpp']['server']['ssl']['verify_peer_name']]])]);
$this->client->require_xep(['0045', '0203', '0199']);
}