]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Should not normalize Salmon author URIs.
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 26 May 2014 12:18:25 +0000 (14:18 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 26 May 2014 12:20:42 +0000 (14:20 +0200)
It's normalized in Discovery->lookup later anyway.

plugins/OStatus/lib/magicenvelope.php

index e7fe88c88f71780d0087a34d591a5a23312c99b4..8da2225952e603b4df0c2892f67f51f5c27cc7bc 100644 (file)
@@ -32,21 +32,6 @@ class MagicEnvelope
 
     const NS = 'http://salmon-protocol.org/ns/magic-env';
 
-    private function normalizeUser($user_id)
-    {
-        if (substr($user_id, 0, 5) == 'http:' ||
-            substr($user_id, 0, 6) == 'https:' ||
-            substr($user_id, 0, 5) == 'acct:') {
-            return $user_id;
-        }
-
-        if (strpos($user_id, '@') !== FALSE) {
-            return 'acct:' . $user_id;
-        }
-
-        return 'http://' . $user_id;
-    }
-
     /**
      * Get the Salmon keypair from a URI, uses XRD Discovery etc.
      *
@@ -211,7 +196,7 @@ class MagicEnvelope
             foreach ($authors as $author) {
                 $uris = $author->getElementsByTagName('uri');
                 foreach ($uris as $uri) {
-                    return $this->normalizeUser($uri->nodeValue);
+                    return $uri->nodeValue;
                 }
             }
         }