Fix extra tg notifications (#6362)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2024-08-21 17:38:53 +07:00
committed by GitHub
parent 5d41a873d1
commit af332c6beb
2 changed files with 2 additions and 10 deletions
@@ -151,7 +151,7 @@ export function isAllowed (
notificationControl: NotificationProviderControl
): boolean {
const providerSetting = (notificationControl.byProvider.get(provider._id) ?? []).find(
({ attachedTo, modifiedBy }) => modifiedBy === receiver
({ createdBy }) => createdBy === receiver
)
if (providerSetting !== undefined && !providerSetting.enabled) {
@@ -168,7 +168,7 @@ export function isAllowed (
return false
}
const setting = (notificationControl.settingsByProvider.get(provider._id) ?? []).find(
(it) => it.type === type._id && it.modifiedBy === receiver
(it) => it.type === type._id && it.createdBy === receiver
)
if (setting !== undefined) {