From 3c99b2af3d3e65aa0c32532559f8d5ebf0ff2e7e Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 28 Sep 2017 10:55:09 +0100 Subject: [PATCH] Fix ability to invite existing mx users Bug introduced by https://github.com/matrix-org/matrix-react-sdk/pull/1432 We should really not be using string constant literals all over the place. We'd be less likely to run into this sort of bug these address types weren't copied literals. --- src/RoomInvite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RoomInvite.js b/src/RoomInvite.js index af0ba3d1e7..ceb3dd0fda 100644 --- a/src/RoomInvite.js +++ b/src/RoomInvite.js @@ -28,7 +28,7 @@ export function inviteToRoom(roomId, addr) { if (addrType == 'email') { return MatrixClientPeg.get().inviteByEmail(roomId, addr); - } else if (addrType == 'mx') { + } else if (addrType == 'mx-user-id') { return MatrixClientPeg.get().invite(roomId, addr); } else { throw new Error('Unsupported address');