Skip to content

Commit

Permalink
Fix extra tg notifications (#6362)
Browse files Browse the repository at this point in the history
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
  • Loading branch information
kristina-fefelova authored Aug 21, 2024
1 parent 5d41a87 commit af332c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,6 @@
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)
}
Expand Down
4 changes: 2 additions & 2 deletions server-plugins/notification-resources/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit af332c6

Please sign in to comment.