forked from Yara724/api
Fixed mismatched userId on field expert for claim
This commit is contained in:
@@ -440,12 +440,13 @@ export class ExpertClaimService {
|
||||
return fallback;
|
||||
}
|
||||
|
||||
/** Owner mobile: linked blame party phone when available, else `users.mobile`. */
|
||||
/** Damaged-party mobile for claim SMS: prefer `damagedPartyUserId`, else `owner.userId`. */
|
||||
private async resolveClaimOwnerPhone(
|
||||
claim: any,
|
||||
): Promise<string | undefined> {
|
||||
if (!claim?.owner?.userId) return undefined;
|
||||
const ownerUserId = String(claim.owner.userId);
|
||||
const notifyUserId = claim?.damagedPartyUserId ?? claim?.owner?.userId;
|
||||
if (!notifyUserId) return undefined;
|
||||
const ownerUserId = String(notifyUserId);
|
||||
if (claim.blameRequestId) {
|
||||
const blame = await this.blameRequestDbService.findById(
|
||||
claim.blameRequestId.toString(),
|
||||
|
||||
Reference in New Issue
Block a user