feat(email): remove rate limit functionality
This commit is contained in:
parent
d7a615b8ea
commit
8a5343156c
@ -58,9 +58,9 @@ class TenantNotificationManager:
|
||||
raise InvalidDataError("All recipient emails are blacklisted")
|
||||
|
||||
# 3. check rate limit
|
||||
rate_limit_result = await self.email_spam_protection_service.check_rate_limit(tenant_id, sender_email)
|
||||
if not rate_limit_result["allowed"]:
|
||||
raise InvalidDataError("Rate limit exceeded")
|
||||
#rate_limit_result = await self.email_spam_protection_service.check_rate_limit(tenant_id, sender_email)
|
||||
#if not rate_limit_result["allowed"]:
|
||||
#raise InvalidDataError("Rate limit exceeded")
|
||||
|
||||
# 4. spam detection with region
|
||||
email_content = {
|
||||
@ -89,7 +89,7 @@ class TenantNotificationManager:
|
||||
"invalid_recipients": invalid_recipients,
|
||||
"invalid_sender": not valid_sender,
|
||||
"blacklisted_recipients": blacklisted_recipients,
|
||||
"rate_limit_info": rate_limit_result,
|
||||
#"rate_limit_info": rate_limit_result,
|
||||
"spam_detection_info": spam_result
|
||||
}
|
||||
}
|
||||
@ -114,7 +114,7 @@ class TenantNotificationManager:
|
||||
"invalid_recipients": invalid_recipients,
|
||||
"invalid_sender": not valid_sender,
|
||||
"blacklisted_recipients": blacklisted_recipients,
|
||||
"rate_limit_info": rate_limit_result,
|
||||
#"rate_limit_info": rate_limit_result,
|
||||
"spam_detection_info": spam_result
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user