Fix for invalid password bug on Synapse?
authorTroplo <troplo@troplo.com>
Tue, 3 Aug 2021 04:23:28 +0000 (14:23 +1000)
committerTroplo <troplo@troplo.com>
Tue, 3 Aug 2021 04:23:28 +0000 (14:23 +1000)
src/client/action/auth.js

index e7b7c635e91c1c5be8ae0a70f363caf1b8b8045c..7b93ae8c5a345525c1c8e2d234f2d98139593c3d 100644 (file)
@@ -15,7 +15,10 @@ async function login(username, homeserver, password) {
   const client = sdk.createClient({ baseUrl });
 
   const response = await client.login('m.login.password', {
-    user: `@${username}:${homeserver}`,
+    identifier: {
+      type: 'm.id.user',
+      user: username,
+    },
     password,
     initial_device_display_name: cons.DEVICE_DISPLAY_NAME,
   });