XMPP debugging: log the message source when discarding empty or unrecognized messages.
This commit is contained in:
parent
8260a88f41
commit
c2bda7726c
@ -253,12 +253,12 @@ class XmppManager extends IoManager
|
|||||||
$from = jabber_normalize_jid($pl['from']);
|
$from = jabber_normalize_jid($pl['from']);
|
||||||
|
|
||||||
if ($pl['type'] != 'chat') {
|
if ($pl['type'] != 'chat') {
|
||||||
$this->log(LOG_WARNING, "Ignoring message of type ".$pl['type']." from $from.");
|
$this->log(LOG_WARNING, "Ignoring message of type ".$pl['type']." from $from: " . $pl['xml']->toString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mb_strlen($pl['body']) == 0) {
|
if (mb_strlen($pl['body']) == 0) {
|
||||||
$this->log(LOG_WARNING, "Ignoring message with empty body from $from.");
|
$this->log(LOG_WARNING, "Ignoring message with empty body from $from: " . $pl['xml']->toString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user