mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 19:58:09 +00:00
UBER-1239: fix missing notifications for mentions from doc (#4820)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
a8351802d1
commit
ff9e4abb7d
@ -609,6 +609,15 @@ export async function createCollabDocInfo (
|
|||||||
}
|
}
|
||||||
|
|
||||||
const targets = new Set(collaborators)
|
const targets = new Set(collaborators)
|
||||||
|
|
||||||
|
// user is not collaborator of himself, but we should notify user of changes related to users account (mentions, comments etc)
|
||||||
|
if (control.hierarchy.isDerived(object._class, contact.class.Person)) {
|
||||||
|
const acc = await getPersonAccount(object._id as Ref<Person>, control)
|
||||||
|
if (acc !== undefined) {
|
||||||
|
targets.add(acc._id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const notifyContexts = await control.findAll(notification.class.DocNotifyContext, {
|
const notifyContexts = await control.findAll(notification.class.DocNotifyContext, {
|
||||||
attachedTo: { $in: activityMessage.map(({ attachedTo }) => attachedTo) }
|
attachedTo: { $in: activityMessage.map(({ attachedTo }) => attachedTo) }
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user