exit(1);
}
-set_include_path(get_include_path() . PATH_SEPARATOR . INSTALLDIR . '/extlib/XMPPHP');
-
/**
* Plugin for XMPP
*
switch ($cls)
{
case 'XMPPHP_XMPP':
- require_once 'XMPP.php';
+ require_once $dir . '/extlib/XMPPHP/XMPP.php';
return false;
case 'Sharing_XMPP':
case 'Queued_XMPP':
$from = $this->normalize($pl['from']);
if ($pl['type'] != 'chat') {
- common_log(LOG_WARNING, "Ignoring message of type ".$pl['type']." from $from.");
- return true;
+ $this->log(LOG_WARNING, "Ignoring message of type ".$pl['type']." from $from: " . $pl['xml']->toString());
+ return;
}
if (mb_strlen($pl['body']) == 0) {
- common_log(LOG_WARNING, "Ignoring message with empty body from $from.");
- return true;
+ $this->log(LOG_WARNING, "Ignoring message with empty body from $from: " . $pl['xml']->toString());
+ return;
}
$this->handle_incoming($from, $pl['body']);