Fix extra tg notifications (#6362)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina 2024-08-21 14:38:53 +04:00 committed by GitHub
parent 5d41a873d1
commit af332c6beb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 10 deletions

View File

@ -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)
} }

View File

@ -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) {