]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
strtolower jids for comparison
authorEvan Prodromou <evan@prodromou.name>
Sat, 30 Aug 2008 05:21:43 +0000 (01:21 -0400)
committerEvan Prodromou <evan@prodromou.name>
Sat, 30 Aug 2008 05:21:43 +0000 (01:21 -0400)
darcs-hash:20080830052143-84dde-81ba3f1e687605d23e9bdc2c3672ac7ae36f9b60.gz

scripts/xmppdaemon.php
scripts/xmppqueuehandler.php

index b1cdb914c1348c592c3b49bdc6b16854883dba9b..d3e767e094170cc2f72dec33e77afc65800199c2 100755 (executable)
@@ -95,7 +95,7 @@ class XMPPDaemon {
                # Forwarded from another daemon (probably a broadcaster) for
                # us to handle
 
-               if (preg_match('/^'.jabber_daemon_address().'/', $from)) {
+               if (preg_match('/^'.strtolower(jabber_daemon_address()).'/', strtolower($from))) {
                        $from = $this->get_ofrom($pl);
                        if (is_null($from)) {
                                return;
index a82f5b9445c8c3a9a3627373e8ed11c8c22de96c..489ae7e7ca6434cf27548c64436bba79f858bbdb 100755 (executable)
@@ -61,6 +61,9 @@ class XmppQueueHandler extends QueueHandler {
        }
 
        function forward_message(&$pl) {
+               if ($pl['type'] != 'chat') {
+                       return;
+               }
                $listener = $this->listener();
                $this->log(LOG_INFO, 'Forwarding message from ' . $pl['from'] . ' to ' . $listener);
                $this->conn->message($this->listener(), $pl['body'], 'chat', NULL, $this->ofrom($pl['from']));