mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +03:00
Fix extra tg notifications (#6362)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
5d41a873d1
commit
af332c6beb
@ -68,14 +68,6 @@
|
|||||||
topic: description
|
topic: description
|
||||||
})
|
})
|
||||||
|
|
||||||
await client.createDoc(notification.class.DocNotifyContext, space._id, {
|
|
||||||
user: account._id,
|
|
||||||
objectId: channelId,
|
|
||||||
objectClass: chunter.class.Channel,
|
|
||||||
objectSpace: core.space.Space,
|
|
||||||
isPinned: false
|
|
||||||
})
|
|
||||||
|
|
||||||
openChannel(channelId, chunter.class.Channel)
|
openChannel(channelId, chunter.class.Channel)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ export function isAllowed (
|
|||||||
notificationControl: NotificationProviderControl
|
notificationControl: NotificationProviderControl
|
||||||
): boolean {
|
): boolean {
|
||||||
const providerSetting = (notificationControl.byProvider.get(provider._id) ?? []).find(
|
const providerSetting = (notificationControl.byProvider.get(provider._id) ?? []).find(
|
||||||
({ attachedTo, modifiedBy }) => modifiedBy === receiver
|
({ createdBy }) => createdBy === receiver
|
||||||
)
|
)
|
||||||
|
|
||||||
if (providerSetting !== undefined && !providerSetting.enabled) {
|
if (providerSetting !== undefined && !providerSetting.enabled) {
|
||||||
@ -168,7 +168,7 @@ export function isAllowed (
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
const setting = (notificationControl.settingsByProvider.get(provider._id) ?? []).find(
|
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) {
|
if (setting !== undefined) {
|
||||||
|
Loading…
Reference in New Issue
Block a user