Fixes where User id in API would return url rather than host
authorJessica Tallon <xray7224@googlemail.com>
Wed, 14 Aug 2013 17:32:27 +0000 (18:32 +0100)
committerJessica Tallon <jessica@megworld.co.uk>
Tue, 22 Jul 2014 22:13:14 +0000 (23:13 +0100)
mediagoblin/db/models.py

index 6d6b2032aadd8a6348444ee32fa7c98ca1f97392..281c09d96caaea9530633c8275a23553c7f70dc6 100644 (file)
@@ -139,7 +139,7 @@ class User(Base, UserMixin):
 
     def serialize(self, request):
         user = {
-            "id": "acct:{0}@{1}".format(self.username, request.url),
+            "id": "acct:{0}@{1}".format(self.username, request.host),
             "preferredUsername": self.username,
             "displayName": "{0}@{1}".format(self.username, request.url),
             "objectType": "person",