summary refs log tree commit diff
path: root/synapse/rest/client/v2_alpha/capabilities.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-12-05 16:46:37 +0000
committerErik Johnston <erik@matrix.org>2019-12-05 16:56:23 +0000
commit9c41ba4c5fe6e554bc885a1bef8ed51d14ec0f3e (patch)
tree7cf412d3be90fb978f46f8cda68ef210d3d6f7de /synapse/rest/client/v2_alpha/capabilities.py
parentMerge pull request #6482 from matrix-org/erikj/port_rest_v1 (diff)
downloadsynapse-9c41ba4c5fe6e554bc885a1bef8ed51d14ec0f3e.tar.xz
Port rest.client.v2
Diffstat (limited to 'synapse/rest/client/v2_alpha/capabilities.py')
-rw-r--r--synapse/rest/client/v2_alpha/capabilities.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/synapse/rest/client/v2_alpha/capabilities.py b/synapse/rest/client/v2_alpha/capabilities.py
index acd58af193..fe9d019c44 100644
--- a/synapse/rest/client/v2_alpha/capabilities.py
+++ b/synapse/rest/client/v2_alpha/capabilities.py
@@ -14,8 +14,6 @@
 # limitations under the License.
 import logging
 
-from twisted.internet import defer
-
 from synapse.api.room_versions import KNOWN_ROOM_VERSIONS
 from synapse.http.servlet import RestServlet
 
@@ -40,10 +38,9 @@ class CapabilitiesRestServlet(RestServlet):
         self.auth = hs.get_auth()
         self.store = hs.get_datastore()
 
-    @defer.inlineCallbacks
-    def on_GET(self, request):
-        requester = yield self.auth.get_user_by_req(request, allow_guest=True)
-        user = yield self.store.get_user_by_id(requester.user.to_string())
+    async def on_GET(self, request):
+        requester = await self.auth.get_user_by_req(request, allow_guest=True)
+        user = await self.store.get_user_by_id(requester.user.to_string())
         change_password = bool(user["password_hash"])
 
         response = {