Skip to content
Permalink
Browse files

Fix nodeinfo and add @username for urls

  • Loading branch information...
yabirgb committed Feb 15, 2019
1 parent 825539d commit 8e84a084fa9ef9ae3bcca725d34b789e3fb79cf5
Showing with 7 additions and 4 deletions.
  1. +3 −2 src/main.py
  2. +2 −1 src/models/user.py
  3. +2 −1 src/urls.py
@@ -20,7 +20,7 @@
UnFavouriteStatus, FetchUserStatuses UnFavouriteStatus, FetchUserStatuses
) )


from api.v1.server import (WellKnownNodeInfo, WellKnownWebFinger, NodeInfo) from api.v1.server import (WellKnownNodeInfo, WellKnownWebFinger, NodeInfo, RegistrationOpen)
from api.v1.media import UploadMedia from api.v1.media import UploadMedia
from api.v1.timelines import (HomeTimeline) from api.v1.timelines import (HomeTimeline)
from api.v1.streaming import SSEHandler, SubscriptionManager from api.v1.streaming import SSEHandler, SubscriptionManager
@@ -70,7 +70,8 @@ def make_app():


(r'/.well-known/nodeinfo', WellKnownNodeInfo), (r'/.well-known/nodeinfo', WellKnownNodeInfo),
(r'/.well-known/webfinger', WellKnownWebFinger), (r'/.well-known/webfinger', WellKnownWebFinger),
(r'/nodeinfo', NodeInfo), (r'/api/nodeinfo/2.0.json', NodeInfo),
(r'/api/instance/registrations', RegistrationOpen),


(r'/api/v1/notifications', NotificationHandler), (r'/api/v1/notifications', NotificationHandler),


@@ -97,7 +97,8 @@ def uris(self):
inbox=f'{self.ap_id}/inbox', inbox=f'{self.ap_id}/inbox',
outbox=f'{self.ap_id}/inbox', outbox=f'{self.ap_id}/inbox',
following=f'{self.ap_id}/following', following=f'{self.ap_id}/following',
followers=f'{self.ap_id}/followers' followers=f'{self.ap_id}/followers',
client=uri('user_client', {"username":self.user.username})
) )


return URIs( return URIs(
@@ -14,7 +14,8 @@
"logout": "/logout", "logout": "/logout",
"featured": "/users/{username}/collections/featured", "featured": "/users/{username}/collections/featured",


"status_client_url": "/@{username}/{id}" "status_client_url": "/@{username}/{id}",
"user_client": "/@{username}"
} }


from models.base import BaseModel from models.base import BaseModel

0 comments on commit 8e84a08

Please sign in to comment.
You can’t perform that action at this time.