Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 446a7368 authored by AVINASH GUSAIN's avatar AVINASH GUSAIN
Browse files

search by email

parent 4a1a512e
Loading
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -107,10 +107,12 @@ export default {
			if (query.length > 0) {
				const promises = [
					this.findAttendeesFromContactsAPI(query),
					this.findAttendeesFromDAV(query),
				]

				const [contactsResults] = await Promise.all(promises)
				const [contactsResults, davResults] = await Promise.all(promises)
				matches.push(...contactsResults)
				matches.push(...davResults)

				// Source of the Regex: https://stackoverflow.com/a/46181
				// eslint-disable-next-line
@@ -208,7 +210,9 @@ export default {
				if (!principal.email) {
					return false
				}

				if (!principal.email.includes(query)) {
					return false
				}
				if (this.alreadyInvitedEmails.includes(principal.email)) {
					return false
				}