summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/rest/client/v2_alpha/capabilities.py4
-rw-r--r--tests/rest/client/v2_alpha/test_capabilities.py4
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'])