From a40ecda9932fc5733c88f2806a745c8ab4d2ec49 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 12 Sep 2019 12:34:14 +0100 Subject: [PATCH] Fix missed case of validAddressTypes being conditional Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/RoomInvite.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/RoomInvite.js b/src/RoomInvite.js index ea5bf847ad..19cbef4242 100644 --- a/src/RoomInvite.js +++ b/src/RoomInvite.js @@ -43,8 +43,6 @@ function inviteMultipleToRoom(roomId, addrs) { export function showStartChatInviteDialog() { const AddressPickerDialog = sdk.getComponent("dialogs.AddressPickerDialog"); - const validAddressTypes = ['mx-user-id', 'email']; - Modal.createTrackedDialog('Start a chat', '', AddressPickerDialog, { title: _t('Start a chat'), description: _t("Who would you like to communicate with?"), @@ -56,7 +54,7 @@ export function showStartChatInviteDialog() { } return _t("Name or Matrix ID"); }, - validAddressTypes, + validAddressTypes: ['mx-user-id', 'email'], button: _t("Start Chat"), onFinished: _onStartDmFinished, }); @@ -65,11 +63,6 @@ export function showStartChatInviteDialog() { export function showRoomInviteDialog(roomId) { const AddressPickerDialog = sdk.getComponent("dialogs.AddressPickerDialog"); - const validAddressTypes = ['mx-user-id']; - if (MatrixClientPeg.get().getIdentityServerUrl()) { - validAddressTypes.push('email'); - } - Modal.createTrackedDialog('Chat Invite', '', AddressPickerDialog, { title: _t('Invite new room members'), button: _t('Send Invites'), @@ -81,7 +74,7 @@ export function showRoomInviteDialog(roomId) { } return _t("Name or Matrix ID"); }, - validAddressTypes, + validAddressTypes: ['mx-user-id', 'email'], onFinished: (shouldInvite, addrs) => { _onRoomInviteFinished(roomId, shouldInvite, addrs); },