]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
better debugging output for forwarded messages
authorEvan Prodromou <evan@prodromou.name>
Sat, 30 Aug 2008 05:59:38 +0000 (01:59 -0400)
committerEvan Prodromou <evan@prodromou.name>
Sat, 30 Aug 2008 05:59:38 +0000 (01:59 -0400)
darcs-hash:20080830055938-84dde-d0c6b241502b674f974f75f6c22b13f9dca8134c.gz

scripts/xmppdaemon.php

index b57f8ef83979ff88e1372f565326d27a2ae5f277..843362cef9c36d71ef431f1908a7ad2f758dc683 100755 (executable)
@@ -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) {