diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-08-30 01:59:38 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-08-30 01:59:38 -0400 |
commit | c3f4789735b309b27ca42d47cbf733adc30aacc2 (patch) | |
tree | a9b74b5587bcfae815a813cbc41c01fd515adcd5 /scripts | |
parent | 4e3b69014eb66a8d63daeb94a0b1b70368d0052b (diff) |
better debugging output for forwarded messages
darcs-hash:20080830055938-84dde-d0c6b241502b674f974f75f6c22b13f9dca8134c.gz
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/xmppdaemon.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php index b57f8ef83..843362cef 100755 --- a/scripts/xmppdaemon.php +++ b/scripts/xmppdaemon.php @@ -146,7 +146,14 @@ class XMPPDaemon { $this->log(LOG_WARNING, 'Type of forwarded message is not ofrom'); return NULL; } - return $address->attr('jid'); + $jid = $address->attr('jid'); + if (!$jid) { + $this->log(LOG_WARNING, 'Could not get jid from address'); + return NULL; + } + $this->log(LOG_DEBUG, 'Got message forwarded from jid ' . $jid); + + return $jid; } function is_autoreply($txt) { |