2
0

🚸 (sendEmail) Allow html parsing for body with a single variable

This commit is contained in:
Baptiste Arnaud
2023-04-18 08:45:10 +02:00
parent 7c2ce2fc41
commit de432ecaf7
3 changed files with 12 additions and 4 deletions

View File

@ -130,7 +130,10 @@ const sendAlertIfLimitReached = async (
const { totalChatsUsed, totalStorageUsed } = await getUsage(workspace.id)
const chatsLimit = getChatsLimit(workspace)
const storageLimit = getStorageLimit(workspace)
if (totalChatsUsed >= chatsLimit || totalStorageUsed >= storageLimit) {
if (
(chatsLimit > 0 && totalChatsUsed >= chatsLimit) ||
(storageLimit > 0 && totalStorageUsed >= storageLimit)
) {
events.push(
...workspace.members
.filter((member) => member.role !== WorkspaceRole.GUEST)