From 53ef4da8c243b0dab68937c36bc68a9366b6a366 Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Fri, 25 Jan 2019 11:04:11 +0000 Subject: track unstable room v3 --- synapse/api/constants.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/synapse/api/constants.py b/synapse/api/constants.py index 46c4b4b9dc..c47346a4bf 100644 --- a/synapse/api/constants.py +++ b/synapse/api/constants.py @@ -104,6 +104,7 @@ class ThirdPartyEntityKind(object): class RoomVersions(object): V1 = "1" V2 = "2" + V3 = "3" VDH_TEST = "vdh-test-version" STATE_V2_TEST = "state-v2-test" @@ -118,6 +119,7 @@ KNOWN_ROOM_VERSIONS = { RoomVersions.V2, RoomVersions.VDH_TEST, RoomVersions.STATE_V2_TEST, + RoomVersions.V3, } ServerNoticeMsgType = "m.server_notice" -- cgit 1.4.1 From a3f0556beadff8590b690e09395bc14bd7a07a24 Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Fri, 25 Jan 2019 11:15:41 +0000 Subject: towncrier --- changelog.d/4472.feature | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/4472.feature diff --git a/changelog.d/4472.feature b/changelog.d/4472.feature new file mode 100644 index 0000000000..b6b2125d06 --- /dev/null +++ b/changelog.d/4472.feature @@ -0,0 +1 @@ +Support room version capabilities in CS API (MSC1804) -- cgit 1.4.1 From 95f871fc0d4fce4bd792146ac397149d13f00484 Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Fri, 25 Jan 2019 11:16:29 +0000 Subject: Support room version capabilities in CS API (MSC1804) --- synapse/rest/client/v2_alpha/capabilities.py | 49 +++++++++++++++++++++++++ tests/rest/client/v2_alpha/test_capabilities.py | 39 ++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 synapse/rest/client/v2_alpha/capabilities.py create mode 100644 tests/rest/client/v2_alpha/test_capabilities.py diff --git a/synapse/rest/client/v2_alpha/capabilities.py b/synapse/rest/client/v2_alpha/capabilities.py new file mode 100644 index 0000000000..d73153ccc7 --- /dev/null +++ b/synapse/rest/client/v2_alpha/capabilities.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2019 New Vector +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from synapse.http.servlet import RestServlet + +from ._base import client_v2_patterns + + +class CapabilitiesRestServlet(RestServlet): + PATTERNS = client_v2_patterns("/capabilities$") + + def __init__(self, hs): + """ + Args: + hs (synapse.server.HomeServer): server + """ + super(CapabilitiesRestServlet, self).__init__() + self.hs = hs + + def on_GET(self, request): + return 200, { + "capabilities": { + "m.room_versions": { + "default": "1", + "available": { + "1": "stable", + "2": "stable", + "state-v2-test": "unstable", + "3": "unstable" + } + } + } + } + + +def register_servlets(hs, http_server): + CapabilitiesRestServlet(hs).register(http_server) diff --git a/tests/rest/client/v2_alpha/test_capabilities.py b/tests/rest/client/v2_alpha/test_capabilities.py new file mode 100644 index 0000000000..1a0ed8d12f --- /dev/null +++ b/tests/rest/client/v2_alpha/test_capabilities.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Copyright 2019 New Vector Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from synapse.api.constants import DEFAULT_ROOM_VERSION, KNOWN_ROOM_VERSIONS +from synapse.rest.client.v2_alpha.capabilities import register_servlets + +from tests import unittest + + +class CapabilitiesTestCase(unittest.HomeserverTestCase): + servlets = [register_servlets] + + def make_homeserver(self, reactor, clock): + self.url = b"/_matrix/client/r0/capabilities" + hs = self.setup_test_homeserver() + return hs + + def test_get_room_version_capabilities(self): + request, channel = self.make_request("GET", self.url) + self.render(request) + capabilities = channel.json_body['capabilities'] + self.assertEqual(channel.code, 200) + for room_version in capabilities['m.room_versions']['available'].keys(): + self.assertTrue(room_version in KNOWN_ROOM_VERSIONS, "" + room_version) + self.assertEqual( + DEFAULT_ROOM_VERSION, capabilities['m.room_versions']['default'] + ) -- cgit 1.4.1 From 893107be78b93699cd96d0e025ee6610bcff9c5a Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Fri, 25 Jan 2019 17:27:36 +0000 Subject: backout v3 --- synapse/api/constants.py | 1 - synapse/rest/client/v2_alpha/capabilities.py | 1 - 2 files changed, 2 deletions(-) diff --git a/synapse/api/constants.py b/synapse/api/constants.py index c47346a4bf..1112618329 100644 --- a/synapse/api/constants.py +++ b/synapse/api/constants.py @@ -119,7 +119,6 @@ KNOWN_ROOM_VERSIONS = { RoomVersions.V2, RoomVersions.VDH_TEST, RoomVersions.STATE_V2_TEST, - RoomVersions.V3, } ServerNoticeMsgType = "m.server_notice" diff --git a/synapse/rest/client/v2_alpha/capabilities.py b/synapse/rest/client/v2_alpha/capabilities.py index d73153ccc7..61319a7a2e 100644 --- a/synapse/rest/client/v2_alpha/capabilities.py +++ b/synapse/rest/client/v2_alpha/capabilities.py @@ -38,7 +38,6 @@ class CapabilitiesRestServlet(RestServlet): "1": "stable", "2": "stable", "state-v2-test": "unstable", - "3": "unstable" } } } -- cgit 1.4.1 From 327b992e17dee1ced66d0b1a38bedce42f43aadf Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Tue, 29 Jan 2019 10:28:35 +0000 Subject: register capabilities servlet --- synapse/rest/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/synapse/rest/__init__.py b/synapse/rest/__init__.py index 66585c991f..91f5247d52 100644 --- a/synapse/rest/__init__.py +++ b/synapse/rest/__init__.py @@ -34,6 +34,7 @@ from synapse.rest.client.v2_alpha import ( account, account_data, auth, + capabilities, devices, filter, groups, @@ -107,3 +108,4 @@ class ClientRestResource(JsonResource): user_directory.register_servlets(hs, client_resource) groups.register_servlets(hs, client_resource) room_upgrade_rest_servlet.register_servlets(hs, client_resource) + capabilities.register_servlets(hs, client_resource) -- cgit 1.4.1 From a124025dab9f64b72cac0ae42c2e0a78f58f301f Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Tue, 29 Jan 2019 11:37:56 +0000 Subject: enforce auth for capabilities endpoint --- synapse/rest/client/v2_alpha/capabilities.py | 27 ++++++++++++++++--------- tests/rest/client/v2_alpha/test_capabilities.py | 23 +++++++++++++++++---- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/synapse/rest/client/v2_alpha/capabilities.py b/synapse/rest/client/v2_alpha/capabilities.py index 61319a7a2e..767e6c9798 100644 --- a/synapse/rest/client/v2_alpha/capabilities.py +++ b/synapse/rest/client/v2_alpha/capabilities.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from twisted.internet import defer from synapse.http.servlet import RestServlet @@ -28,20 +29,26 @@ class CapabilitiesRestServlet(RestServlet): """ super(CapabilitiesRestServlet, self).__init__() self.hs = hs + self.auth = hs.get_auth() + @defer.inlineCallbacks def on_GET(self, request): - return 200, { - "capabilities": { - "m.room_versions": { - "default": "1", - "available": { - "1": "stable", - "2": "stable", - "state-v2-test": "unstable", + + yield self.auth.get_user_by_req(request, allow_guest=True) + defer.returnValue( + (200, { + "capabilities": { + "m.room_versions": { + "default": "1", + "available": { + "1": "stable", + "2": "stable", + "state-v2-test": "unstable", + } } } - } - } + }) + ) def register_servlets(hs, http_server): diff --git a/tests/rest/client/v2_alpha/test_capabilities.py b/tests/rest/client/v2_alpha/test_capabilities.py index 1a0ed8d12f..f9f80c8969 100644 --- a/tests/rest/client/v2_alpha/test_capabilities.py +++ b/tests/rest/client/v2_alpha/test_capabilities.py @@ -14,23 +14,38 @@ # limitations under the License. from synapse.api.constants import DEFAULT_ROOM_VERSION, KNOWN_ROOM_VERSIONS -from synapse.rest.client.v2_alpha.capabilities import register_servlets - +from synapse.rest.client.v2_alpha import capabilities +from synapse.rest.client.v1 import login, admin from tests import unittest class CapabilitiesTestCase(unittest.HomeserverTestCase): - servlets = [register_servlets] + + servlets = [ + admin.register_servlets, + capabilities.register_servlets, + login.register_servlets, + ] def make_homeserver(self, reactor, clock): self.url = b"/_matrix/client/r0/capabilities" hs = self.setup_test_homeserver() return hs - def test_get_room_version_capabilities(self): + def test_check_auth_required(self): request, channel = self.make_request("GET", self.url) self.render(request) + + self.assertEqual(channel.code, 401) + + def test_get_room_version_capabilities(self): + self.register_user("user", "pass") + access_token = self.login("user", "pass") + + request, channel = self.make_request("GET", self.url, access_token=access_token) + self.render(request) capabilities = channel.json_body['capabilities'] + self.assertEqual(channel.code, 200) for room_version in capabilities['m.room_versions']['available'].keys(): self.assertTrue(room_version in KNOWN_ROOM_VERSIONS, "" + room_version) -- cgit 1.4.1 From 4eeb2fb215eff17042021095e7fac73d449bdc13 Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Tue, 29 Jan 2019 12:44:10 +0000 Subject: isort --- tests/rest/client/v2_alpha/test_capabilities.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/rest/client/v2_alpha/test_capabilities.py b/tests/rest/client/v2_alpha/test_capabilities.py index f9f80c8969..131a4af417 100644 --- a/tests/rest/client/v2_alpha/test_capabilities.py +++ b/tests/rest/client/v2_alpha/test_capabilities.py @@ -14,8 +14,9 @@ # limitations under the License. from synapse.api.constants import DEFAULT_ROOM_VERSION, KNOWN_ROOM_VERSIONS +from synapse.rest.client.v1 import admin, login from synapse.rest.client.v2_alpha import capabilities -from synapse.rest.client.v1 import login, admin + from tests import unittest -- cgit 1.4.1 From f03b3a7a3a33df190ec9473ffc5bc4be04c58ae8 Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Tue, 29 Jan 2019 15:58:37 +0000 Subject: support change_password in capabilities end-point --- synapse/rest/client/v2_alpha/capabilities.py | 14 ++++++++++++-- tests/rest/client/v2_alpha/test_capabilities.py | 23 +++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/synapse/rest/client/v2_alpha/capabilities.py b/synapse/rest/client/v2_alpha/capabilities.py index 767e6c9798..08df941b5f 100644 --- a/synapse/rest/client/v2_alpha/capabilities.py +++ b/synapse/rest/client/v2_alpha/capabilities.py @@ -12,14 +12,20 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +import logging + from twisted.internet import defer from synapse.http.servlet import RestServlet from ._base import client_v2_patterns +logger = logging.getLogger(__name__) + class CapabilitiesRestServlet(RestServlet): + """End point to expose the capabilities of the server.""" + PATTERNS = client_v2_patterns("/capabilities$") def __init__(self, hs): @@ -30,11 +36,14 @@ class CapabilitiesRestServlet(RestServlet): super(CapabilitiesRestServlet, self).__init__() self.hs = hs 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()) + change_password = bool(user['password_hash']) - yield self.auth.get_user_by_req(request, allow_guest=True) defer.returnValue( (200, { "capabilities": { @@ -45,7 +54,8 @@ class CapabilitiesRestServlet(RestServlet): "2": "stable", "state-v2-test": "unstable", } - } + }, + "m.change_password": change_password, } }) ) diff --git a/tests/rest/client/v2_alpha/test_capabilities.py b/tests/rest/client/v2_alpha/test_capabilities.py index 131a4af417..62dbfa06b2 100644 --- a/tests/rest/client/v2_alpha/test_capabilities.py +++ b/tests/rest/client/v2_alpha/test_capabilities.py @@ -31,6 +31,7 @@ class CapabilitiesTestCase(unittest.HomeserverTestCase): def make_homeserver(self, reactor, clock): self.url = b"/_matrix/client/r0/capabilities" hs = self.setup_test_homeserver() + self.store = hs.get_datastore() return hs def test_check_auth_required(self): @@ -53,3 +54,25 @@ class CapabilitiesTestCase(unittest.HomeserverTestCase): self.assertEqual( DEFAULT_ROOM_VERSION, capabilities['m.room_versions']['default'] ) + + def test_get_change_password_capabilities(self): + localpart = "user" + password = "pass" + user = self.register_user(localpart, password) + access_token = self.login(user, password) + + request, channel = self.make_request("GET", self.url, access_token=access_token) + self.render(request) + capabilities = channel.json_body['capabilities'] + + self.assertEqual(channel.code, 200) + + # Test case where password is handled outside of Synapse + self.assertTrue(capabilities['m.change_password']) + self.get_success(self.store.user_set_password_hash(user, None)) + request, channel = self.make_request("GET", self.url, access_token=access_token) + self.render(request) + capabilities = channel.json_body['capabilities'] + + self.assertEqual(channel.code, 200) + self.assertFalse(capabilities['m.change_password']) -- cgit 1.4.1 From 19259d903c295d03ad1cda59f8b31f65aded231e Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Tue, 29 Jan 2019 16:01:46 +0000 Subject: update to reflect broadening scope --- changelog.d/4472.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/4472.feature b/changelog.d/4472.feature index b6b2125d06..3413c33d48 100644 --- a/changelog.d/4472.feature +++ b/changelog.d/4472.feature @@ -1 +1 @@ -Support room version capabilities in CS API (MSC1804) +Support exposing server capabilities in CS API (MSC1753, MSC1804) -- cgit 1.4.1 From e4bef9d470aa99cbb06b0a19fcafc5bd32008207 Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Tue, 29 Jan 2019 18:04:56 +0000 Subject: rework format of change password capability --- synapse/rest/client/v2_alpha/capabilities.py | 4 +++- tests/rest/client/v2_alpha/test_capabilities.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/synapse/rest/client/v2_alpha/capabilities.py b/synapse/rest/client/v2_alpha/capabilities.py index 08df941b5f..756c2dbdec 100644 --- a/synapse/rest/client/v2_alpha/capabilities.py +++ b/synapse/rest/client/v2_alpha/capabilities.py @@ -55,7 +55,9 @@ class CapabilitiesRestServlet(RestServlet): "state-v2-test": "unstable", } }, - "m.change_password": change_password, + "m.change_password": { + "enabled": change_password, + }, } }) ) diff --git a/tests/rest/client/v2_alpha/test_capabilities.py b/tests/rest/client/v2_alpha/test_capabilities.py index 62dbfa06b2..d3d43970fb 100644 --- a/tests/rest/client/v2_alpha/test_capabilities.py +++ b/tests/rest/client/v2_alpha/test_capabilities.py @@ -68,11 +68,11 @@ class CapabilitiesTestCase(unittest.HomeserverTestCase): self.assertEqual(channel.code, 200) # Test case where password is handled outside of Synapse - self.assertTrue(capabilities['m.change_password']) + self.assertTrue(capabilities['m.change_password']['enabled']) self.get_success(self.store.user_set_password_hash(user, None)) request, channel = self.make_request("GET", self.url, access_token=access_token) self.render(request) capabilities = channel.json_body['capabilities'] self.assertEqual(channel.code, 200) - self.assertFalse(capabilities['m.change_password']) + self.assertFalse(capabilities['m.change_password']['enabled']) -- cgit 1.4.1 From c7837dce248a4a482cdd66caadd5fd5550d56e6f Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Wed, 30 Jan 2019 09:33:30 +0000 Subject: reflect that rooms v3 is a stable room version --- synapse/api/constants.py | 1 + synapse/rest/client/v2_alpha/capabilities.py | 1 + 2 files changed, 2 insertions(+) diff --git a/synapse/api/constants.py b/synapse/api/constants.py index 1112618329..c47346a4bf 100644 --- a/synapse/api/constants.py +++ b/synapse/api/constants.py @@ -119,6 +119,7 @@ KNOWN_ROOM_VERSIONS = { RoomVersions.V2, RoomVersions.VDH_TEST, RoomVersions.STATE_V2_TEST, + RoomVersions.V3, } ServerNoticeMsgType = "m.server_notice" diff --git a/synapse/rest/client/v2_alpha/capabilities.py b/synapse/rest/client/v2_alpha/capabilities.py index 756c2dbdec..3dad4e9542 100644 --- a/synapse/rest/client/v2_alpha/capabilities.py +++ b/synapse/rest/client/v2_alpha/capabilities.py @@ -53,6 +53,7 @@ class CapabilitiesRestServlet(RestServlet): "1": "stable", "2": "stable", "state-v2-test": "unstable", + "3": "stable", } }, "m.change_password": { -- cgit 1.4.1 From 2f4680405507aa421d7c32052b3cd522969c0b3a Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Wed, 30 Jan 2019 09:39:10 +0000 Subject: Populate default room version from Constants --- synapse/rest/client/v2_alpha/capabilities.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/synapse/rest/client/v2_alpha/capabilities.py b/synapse/rest/client/v2_alpha/capabilities.py index 3dad4e9542..21e79f9233 100644 --- a/synapse/rest/client/v2_alpha/capabilities.py +++ b/synapse/rest/client/v2_alpha/capabilities.py @@ -16,6 +16,7 @@ import logging from twisted.internet import defer +from synapse.api.constants import DEFAULT_ROOM_VERSION from synapse.http.servlet import RestServlet from ._base import client_v2_patterns @@ -48,7 +49,7 @@ class CapabilitiesRestServlet(RestServlet): (200, { "capabilities": { "m.room_versions": { - "default": "1", + "default": DEFAULT_ROOM_VERSION, "available": { "1": "stable", "2": "stable", -- cgit 1.4.1 From 9c850d9d5e83c91cfbc89f978d57ec55b982a1fc Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Wed, 30 Jan 2019 10:23:26 +0000 Subject: formatting and use constants where available --- synapse/rest/client/v2_alpha/capabilities.py | 36 +++++++++++++--------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/synapse/rest/client/v2_alpha/capabilities.py b/synapse/rest/client/v2_alpha/capabilities.py index 21e79f9233..de3cf2b072 100644 --- a/synapse/rest/client/v2_alpha/capabilities.py +++ b/synapse/rest/client/v2_alpha/capabilities.py @@ -16,7 +16,8 @@ import logging from twisted.internet import defer -from synapse.api.constants import DEFAULT_ROOM_VERSION +from synapse.api.constants import DEFAULT_ROOM_VERSION, RoomVersions, RoomDisposition + from synapse.http.servlet import RestServlet from ._base import client_v2_patterns @@ -43,26 +44,23 @@ class CapabilitiesRestServlet(RestServlet): 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()) - change_password = bool(user['password_hash']) + change_password = bool(user["password_hash"]) - defer.returnValue( - (200, { - "capabilities": { - "m.room_versions": { - "default": DEFAULT_ROOM_VERSION, - "available": { - "1": "stable", - "2": "stable", - "state-v2-test": "unstable", - "3": "stable", - } - }, - "m.change_password": { - "enabled": change_password, + response = { + "capabilities": { + "m.room_versions": { + "default": DEFAULT_ROOM_VERSION, + "available": { + RoomVersions.V1: RoomDisposition.STABLE, + RoomVersions.V2: RoomDisposition.STABLE, + RoomVersions.STATE_V2_TEST: RoomDisposition.UNSTABLE, + RoomVersions.V3: RoomDisposition.STABLE, }, - } - }) - ) + }, + "m.change_password": {"enabled": change_password}, + } + } + defer.returnValue((200, response)) def register_servlets(hs, http_server): -- cgit 1.4.1 From c5a0f82cca76a47c5c5ffb0b17a733829de15cb5 Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Wed, 30 Jan 2019 10:24:24 +0000 Subject: define room dispositions for use in exposing room capabilities --- synapse/api/constants.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/synapse/api/constants.py b/synapse/api/constants.py index c47346a4bf..2c6417c65a 100644 --- a/synapse/api/constants.py +++ b/synapse/api/constants.py @@ -109,6 +109,11 @@ class RoomVersions(object): STATE_V2_TEST = "state-v2-test" +class RoomDisposition(object): + STABLE = "stable", + UNSTABLE = "unstable" + + # the version we will give rooms which are created on this server DEFAULT_ROOM_VERSION = RoomVersions.V1 -- cgit 1.4.1 From f834d9840239db1cb101ec717c250a9f616a3049 Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Wed, 30 Jan 2019 10:55:42 +0000 Subject: isort --- synapse/rest/client/v2_alpha/capabilities.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/synapse/rest/client/v2_alpha/capabilities.py b/synapse/rest/client/v2_alpha/capabilities.py index de3cf2b072..373f95126e 100644 --- a/synapse/rest/client/v2_alpha/capabilities.py +++ b/synapse/rest/client/v2_alpha/capabilities.py @@ -16,8 +16,7 @@ import logging from twisted.internet import defer -from synapse.api.constants import DEFAULT_ROOM_VERSION, RoomVersions, RoomDisposition - +from synapse.api.constants import DEFAULT_ROOM_VERSION, RoomDisposition, RoomVersions from synapse.http.servlet import RestServlet from ._base import client_v2_patterns -- cgit 1.4.1