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.
This commit is contained in:
Luke Barnard 2017-09-28 10:55:09 +01:00 committed by GitHub
parent 1699c37fcf
commit 3c99b2af3d

View file

@ -28,7 +28,7 @@ export function inviteToRoom(roomId, addr) {
if (addrType == 'email') { if (addrType == 'email') {
return MatrixClientPeg.get().inviteByEmail(roomId, addr); return MatrixClientPeg.get().inviteByEmail(roomId, addr);
} else if (addrType == 'mx') { } else if (addrType == 'mx-user-id') {
return MatrixClientPeg.get().invite(roomId, addr); return MatrixClientPeg.get().invite(roomId, addr);
} else { } else {
throw new Error('Unsupported address'); throw new Error('Unsupported address');