]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/jabber.php
twiddle some parens in imsettings for gettext
[quix0rs-gnu-social.git] / lib / jabber.php
index 9b6d1c71a640cae4b17b4f53d8f0f1011638305c..a36e19044e5dcb2a3e2da5c0a7b8f4c16ac33513 100644 (file)
@@ -53,6 +53,7 @@ function jabber_connect($resource=NULL) {
                                         ($resource) ? $resource :
                                                common_config('xmpp', 'resource'),
                                         common_config('xmpp', 'server'));
+               $conn->autoSubscribe();
 
                if (!$conn) {
                        return false;
@@ -93,7 +94,7 @@ function jabber_confirm_address($code, $nickname, $address) {
                'address bar of your browser). If that user isn\'t you, ' .
                'or if you didn\'t request this confirmation, just ignore this message.';
 
-       jabber_send_message($address, $body);
+       return jabber_send_message($address, $body);
 }
 
 function jabber_special_presence($type, $to=NULL, $show=NULL, $status=NULL) {
@@ -132,7 +133,7 @@ function jabber_broadcast_notice($notice) {
                while ($sub->fetch()) {
                        $user = User::staticGet($sub->subscriber);
                        if ($user && $user->jabber && $user->jabbernotify) {
-                               common_log(LOG_INFO, 
+                               common_log(LOG_INFO,
                                                   'Sending notice ' . $notice->id . ' to ' . $user->jabber,
                                                   __FILE__);
                                $success = jabber_send_message($user->jabber, $msg);