summaryrefslogtreecommitdiff
path: root/scripts/xmppdaemon.php
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/xmppdaemon.php')
-rwxr-xr-xscripts/xmppdaemon.php9
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) {