diff --git a/src/components/views/rooms/MemberInfo.js b/src/components/views/rooms/MemberInfo.js index 35161dedf7..be10a3900f 100644 --- a/src/components/views/rooms/MemberInfo.js +++ b/src/components/views/rooms/MemberInfo.js @@ -735,8 +735,8 @@ module.exports = withMatrixClient(React.createClass({ // we're only inviting one user. const inviter = new MultiInviter(roomId); await inviter.invite([member.userId]).then(() => { - if (inviter.getCompletionState(userId) !== "invited") - throw new Error(inviter.getErrorText(userId)); + if (inviter.getCompletionState(member.userId) !== "invited") + throw new Error(inviter.getErrorText(member.userId)); }); } catch (err) { const ErrorDialog = sdk.getComponent('dialogs.ErrorDialog');