You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Check if address type is mx-user-id
This commit is contained in:
@ -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;
|
||||||
|
Reference in New Issue
Block a user