mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-28 12:35:02 +02:00
Fix email notification (#6425)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import contact, {
|
||||
type PersonAccount,
|
||||
getName as getContactName
|
||||
} from '@hcengineering/contact'
|
||||
import { type Doc, type IdMap, type Ref, toIdMap } from '@hcengineering/core'
|
||||
import { type Client, type Doc, type IdMap, type Ref, toIdMap } from '@hcengineering/core'
|
||||
import { type Message, type SharedMessage } from '@hcengineering/gmail'
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
import gmail from './plugin'
|
||||
@@ -129,3 +129,9 @@ export function getName (
|
||||
return emp != null ? `${getContactName(h, emp)} (${emailVal})` : emailVal
|
||||
}
|
||||
}
|
||||
|
||||
export async function MessageTitleProvider (client: Client, ref: Ref<Message>, doc?: Message): Promise<string> {
|
||||
const object = doc ?? (await client.findOne(gmail.class.Message, { _id: ref }))
|
||||
|
||||
return object?.subject ?? ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user