diff --git a/server-plugins/notification-resources/src/index.ts b/server-plugins/notification-resources/src/index.ts index 46eac8355f..27eefa2c8e 100644 --- a/server-plugins/notification-resources/src/index.ts +++ b/server-plugins/notification-resources/src/index.ts @@ -609,6 +609,15 @@ export async function createCollabDocInfo ( } 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, control) + if (acc !== undefined) { + targets.add(acc._id) + } + } + const notifyContexts = await control.findAll(notification.class.DocNotifyContext, { attachedTo: { $in: activityMessage.map(({ attachedTo }) => attachedTo) } })