UBERF-9429: Provide workspace ids to storage adapters (#7956)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev
2025-02-14 15:59:36 +07:00
committed by GitHub
parent ddc8230890
commit e8df531654
53 changed files with 740 additions and 688 deletions
@@ -25,8 +25,7 @@ import {
Ref,
Tx,
TxCreateDoc,
TxProcessor,
type WorkspaceDataId
TxProcessor
} from '@hcengineering/core'
import notification, {
ActivityInboxNotification,
@@ -179,8 +178,7 @@ export async function createPushNotification (
const provider = getAvatarProviderId(senderAvatar.avatarType)
if (provider === contact.avatarProvider.Image) {
if (senderAvatar.avatar != null) {
const dataId = control.workspace.dataId ?? (control.workspace.uuid as unknown as WorkspaceDataId)
const url = await control.storageAdapter.getUrl(control.ctx, dataId, senderAvatar.avatar)
const url = await control.storageAdapter.getUrl(control.ctx, control.workspace, senderAvatar.avatar)
data.icon = url.includes('://') ? url : concatLink(front, url)
}
} else if (provider === contact.avatarProvider.Gravatar && senderAvatar.avatarProps?.url !== undefined) {