]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/jabber.php
csrf protection in userauthorization
[quix0rs-gnu-social.git] / lib / jabber.php
index cba7f62c4cb38400b0d88a54a688eea67a94275a..1202aa32227505f4d0682389063c695728f6fa73 100644 (file)
@@ -82,7 +82,8 @@ function jabber_connect($resource=NULL) {
                                                                XMPPHP_Log::LEVEL_VERBOSE :  NULL
                                                                );
                $conn->autoSubscribe();
-
+               $conn->useEncryption(common_config('xmpp', 'encryption'));
+               
                if (!$conn) {
                        return false;
                }
@@ -270,8 +271,9 @@ function jabber_broadcast_notice($notice) {
        $public = common_config('xmpp', 'public');
        
        # FIXME PRIV don't send out private messages here
+       # XXX: should we send out non-local messages if public,localonly = false? I think not
        
-       if ($public) {
+       if ($public && $notice->is_local) {
                foreach ($public as $address) {
                                common_log(LOG_INFO,
                                                   'Sending notice ' . $notice->id . ' to public listener ' . $address,