1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-06-26 04:01:04 +03:00

Merge remote-tracking branch 'origin/wmwragg/chat-multi-invite' into dbkr/wmwragg/chat-multi-invite

This commit is contained in:
David Baker
2016-09-13 14:51:46 +01:00
29 changed files with 861 additions and 204 deletions

View File

@ -57,4 +57,20 @@ export function inviteToRoom(roomId, addr) {
export function inviteMultipleToRoom(roomId, addrs) {
this.inviter = new MultiInviter(roomId);
return inviter.invite(addrs);
export function isValidAddress(addr) {
// Check if the addr is a valid type
var addrType = this.getAddressType(addr);
if (addrType === "mx") {
let user = MatrixClientPeg.get().getUser(addr);
if (user) {
return true;
} else {
return false;
}
} else if (addrType === "email") {
return true;
} else {
return false;
}
}