mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Fix missed case of validAddressTypes being conditional
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
043a8d35e6
commit
a40ecda993
@ -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);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user