Check if address type is mx-user-id
parent
3b66821258
commit
3a91dff711
|
@ -666,14 +666,15 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
||||||
if (targetIds.length > 1) {
|
if (targetIds.length > 1) {
|
||||||
createRoomOptions.createOpts = targetIds.reduce(
|
createRoomOptions.createOpts = targetIds.reduce(
|
||||||
(roomOptions, address) => {
|
(roomOptions, address) => {
|
||||||
if (getAddressType(address) === 'email') {
|
const type = getAddressType(address);
|
||||||
|
if (type === 'email') {
|
||||||
const invite: IInvite3PID = {
|
const invite: IInvite3PID = {
|
||||||
id_server: client.getIdentityServerUrl(true),
|
id_server: client.getIdentityServerUrl(true),
|
||||||
medium: 'email',
|
medium: 'email',
|
||||||
address,
|
address,
|
||||||
};
|
};
|
||||||
roomOptions.invite_3pid.push(invite);
|
roomOptions.invite_3pid.push(invite);
|
||||||
} else {
|
} else if (type === 'mx-user-id') {
|
||||||
roomOptions.invite.push(address);
|
roomOptions.invite.push(address);
|
||||||
}
|
}
|
||||||
return roomOptions;
|
return roomOptions;
|
||||||
|
|
Loading…
Reference in New Issue