1
0
forked from Yara724/api

fixed many bugs and step issues

This commit is contained in:
SepehrYahyaee
2026-04-18 17:04:19 +03:30
parent 7f5b64f2a6
commit 0086b8db4d
14 changed files with 443 additions and 89 deletions

View File

@@ -19,7 +19,12 @@ export function blameCaseTouchesClient(doc: any, clientKey: string): boolean {
}
export function claimCaseTouchesClient(doc: any, clientKey: string): boolean {
return String(doc?.owner?.userClientKey ?? "") === String(clientKey);
const id = String(clientKey);
const owner = doc?.owner as
| { clientId?: unknown; userClientKey?: unknown }
| undefined;
const tenantId = owner?.clientId ?? owner?.userClientKey;
return String(tenantId ?? "") === id;
}
/**