small update
This commit is contained in:
parent
783d2c322a
commit
4e1ba15a5d
@ -36,14 +36,6 @@ class MessageService {
|
||||
throw new Error("Temporary email not authorized");
|
||||
}
|
||||
|
||||
const isToValid = await Promise.all(
|
||||
messageData.to.split(",").map((email) => this.isValidEmail(email.trim()))
|
||||
);
|
||||
|
||||
if (isToValid.includes(false)) {
|
||||
throw new Error("Receiving to temporary email addresses is not allowed");
|
||||
}
|
||||
|
||||
return Message.query().insert({
|
||||
...messageData,
|
||||
temp_email_id: tempEmail.id,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user