Remove org model; make AppUser global with super admin
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s
This commit is contained in:
@@ -157,11 +157,11 @@ class EmailIngestionService(
|
||||
private fun resolveGuest(property: Property, extracted: Map<String, String>): Guest {
|
||||
val phone = extracted["guestPhone"]?.takeIf { !it.contains("NONE", true) }?.trim()
|
||||
if (!phone.isNullOrBlank()) {
|
||||
val existing = guestRepo.findByOrgIdAndPhoneE164(property.org.id!!, phone)
|
||||
val existing = guestRepo.findByPropertyIdAndPhoneE164(property.id!!, phone)
|
||||
if (existing != null) return existing
|
||||
}
|
||||
val guest = Guest(
|
||||
org = property.org,
|
||||
property = property,
|
||||
phoneE164 = phone,
|
||||
name = extracted["guestName"]?.takeIf { !it.contains("NONE", true) }
|
||||
)
|
||||
@@ -281,10 +281,6 @@ class EmailIngestionService(
|
||||
if (propertyEmails.isNotEmpty() && recipients.any { it.lowercase() in propertyEmails }) {
|
||||
return@filter true
|
||||
}
|
||||
val orgEmails = property.org.emailAliases.map { it.lowercase() }.toSet()
|
||||
if (orgEmails.isNotEmpty() && recipients.any { it.lowercase() in orgEmails }) {
|
||||
return@filter true
|
||||
}
|
||||
}
|
||||
val aliases = mutableSetOf<String>()
|
||||
aliases.add(property.name)
|
||||
|
||||
Reference in New Issue
Block a user