mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-24 18:45:06 +02:00
UBERF-6189 Fix document inbox issues (#5072)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
|
||||
import {
|
||||
type AttachedData,
|
||||
type Client,
|
||||
type Ref,
|
||||
type TxOperations,
|
||||
getCollaborativeDoc,
|
||||
@@ -138,3 +139,8 @@ function parseDocumentId (shortLink: string): Ref<Document> | undefined {
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
export async function documentTitleProvider (client: Client, ref: Ref<Document>, doc?: Document): Promise<string> {
|
||||
const object = doc ?? (await client.findOne(document.class.Document, { _id: ref }))
|
||||
return object?.name ?? ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user