Example #1
0
File: Login.php Project: Nyco/movim
 function onStart($packet)
 {
     $pd = new \Modl\PresenceDAO();
     $pd->clearPresence($this->user->getLogin());
     $session = \Sessionx::start();
     $session->load();
     if ($session->mechanism != 'ANONYMOUS') {
         // http://xmpp.org/extensions/xep-0280.html
         \Moxl\Stanza\Carbons::enable();
         // We refresh the roster
         $r = new GetList();
         $r->request();
         // We get the configuration
         $s = new Get();
         $s->setXmlns('movim:prefs')->request();
     }
 }
Example #2
0
 function onStart($packet)
 {
     $session = \Session::start();
     if ($session->get('mechanism') != 'ANONYMOUS') {
         // http://xmpp.org/extensions/xep-0280.html
         \Moxl\Stanza\Carbons::enable();
         // We refresh the roster
         $r = new GetList();
         $r->request();
         // We refresh the messages
         //$c = new Chats;
         //$c->ajaxGetHistory();
         // We get the configuration
         $s = new Get();
         $s->setXmlns('movim:prefs')->request();
     }
 }