mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-01 04:35:46 +00:00
Fix double DM context (#7835)
This commit is contained in:
parent
a20bd98d05
commit
80f3bbe851
@ -629,24 +629,6 @@ export async function createDirect (employeeIds: Array<Ref<Employee>>): Promise<
|
|||||||
if (context.hidden) {
|
if (context.hidden) {
|
||||||
await client.updateDoc(context._class, context.space, context._id, { hidden: false })
|
await client.updateDoc(context._class, context.space, context._id, { hidden: false })
|
||||||
}
|
}
|
||||||
|
|
||||||
return dmId
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const space = await client.findOne(
|
|
||||||
contact.class.PersonSpace,
|
|
||||||
{ person: me.person as Ref<Person> },
|
|
||||||
{ projection: { _id: 1 } }
|
|
||||||
)
|
|
||||||
if (space == null) return dmId
|
|
||||||
await client.createDoc(notification.class.DocNotifyContext, space._id, {
|
|
||||||
user: me._id,
|
|
||||||
objectId: dmId,
|
|
||||||
objectClass: chunter.class.DirectMessage,
|
|
||||||
objectSpace: core.space.Space,
|
|
||||||
hidden: false,
|
|
||||||
isPinned: false
|
|
||||||
})
|
|
||||||
|
|
||||||
return dmId
|
return dmId
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user