|
|
@ -88,6 +88,18 @@ class ThreepidRestServlet(RestServlet): |
|
|
|
self.identity_handler = hs.get_handlers().identity_handler |
|
|
|
self.identity_handler = hs.get_handlers().identity_handler |
|
|
|
self.auth = hs.get_auth() |
|
|
|
self.auth = hs.get_auth() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@defer.inlineCallbacks |
|
|
|
|
|
|
|
def on_GET(self, request): |
|
|
|
|
|
|
|
yield run_on_reactor() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
auth_user, _ = yield self.auth.get_user_by_req(request) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
threepids = yield self.hs.get_datastore().user_get_threepids( |
|
|
|
|
|
|
|
auth_user.to_string() |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
defer.returnValue((200, {'threepids': threepids})) |
|
|
|
|
|
|
|
|
|
|
|
@defer.inlineCallbacks |
|
|
|
@defer.inlineCallbacks |
|
|
|
def on_POST(self, request): |
|
|
|
def on_POST(self, request): |
|
|
|
yield run_on_reactor() |
|
|
|
yield run_on_reactor() |
|
|
|