From 0530a64f1905876ee2e6c38b4ee07e6d7ca84801 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 11 May 2019 18:46:13 +0100 Subject: [PATCH] Fix invite via MemberInfo. Thank U JetBrains for solving this one for me <3 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/rooms/MemberInfo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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');