]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - xmppdaemon.php
limit rss streams to 100 items by default
[quix0rs-gnu-social.git] / xmppdaemon.php
index 3f2b575e4955a11d51ccc02daf54f410f7e2ae27..afe248c8e4f2fa4394cef43d3325032a0a93dd8a 100755 (executable)
@@ -111,6 +111,10 @@ class XMPPDaemon {
                if (strlen($pl['body']) == 0) {
                        return;
                }
+
+               $from = jabber_normalize_jid($pl['from']);
+               $user = $this->get_user($from);
+
                if (!$user) {
                        $this->log(LOG_WARNING, 'Message from unknown user ' . $from);
                        return;
@@ -194,30 +198,7 @@ class XMPPDaemon {
                                   'Accepted subscription from ' . $from);
                                break;
                        case 'subscribed':
-                               $confirm = $this->get_confirmation($from);
-                               if ($confirm) {
-                                       $user = User::staticGet($confirm->user_id);
-                                       if ($user) {
-                                               jabber_confirm_address($confirm->code,
-                                                                      $user->nickname,
-                                                                      $confirm->address);
-                                       } else {
-                                               $this->log(LOG_WARNING,
-                                                       'got unexpected subscribed message from ' . $from);
-                                       }
-                               }
                        case 'unsubscribed':
-                               $user = $this->get_user($from);
-                               if ($user) {
-                                       $this->set_notify($user, false);
-                               }
-
-                               $confirm = $this->get_confirmation($from);
-                               if ($confirm) {
-                                       $user = User::staticGet($confirm->user_id);
-                                       if ($user) {
-                                       }
-                               }
                        case 'unsubscribe':
                                $this->log(LOG_INFO,
                                   'Ignoring  "' . $pl['type'] . '" from ' . $from);