1
0
forked from Yara724/api

Fixed resend blame and claim sms start

This commit is contained in:
SepehrYahyaee
2026-05-30 16:18:11 +03:30
parent 7aada14551
commit 3b0db0d250
5 changed files with 87 additions and 45 deletions

View File

@@ -6682,19 +6682,19 @@ export class RequestManagementService {
] = (voiceDoc as any)._id;
mergedRow.resendVoiceId = (voiceDoc as any)._id;
uploadedItems.push(canonKey);
} else if (canonKey === ResendItemType.VIDEO) {
const videoDoc = await this.blameVideoDbService.create({
path: file.path,
requestId: new Types.ObjectId(requestId),
fileName: file.filename,
});
updatePayload.$set[`parties.${partyIndex}.evidence.videoId`] = String(
(videoDoc as any)._id,
);
updatePayload.$set[
`expert.resend.parties.${resendIndex}.resendVideoId`
] = (videoDoc as any)._id;
mergedRow.resendVideoId = (videoDoc as any)._id;
// } else if (canonKey === ResendItemType.VIDEO) {
// const videoDoc = await this.blameVideoDbService.create({
// path: file.path,
// requestId: new Types.ObjectId(requestId),
// fileName: file.filename,
// });
// updatePayload.$set[`parties.${partyIndex}.evidence.videoId`] = String(
// (videoDoc as any)._id,
// );
// updatePayload.$set[
// `expert.resend.parties.${resendIndex}.resendVideoId`
// ] = (videoDoc as any)._id;
// mergedRow.resendVideoId = (videoDoc as any)._id;
uploadedItems.push(canonKey);
} else {
const docType = canonKey as BlameDocumentType;
@@ -6932,7 +6932,12 @@ export class RequestManagementService {
if (targetPhone) {
const publicId = String(updatedRequest.publicId);
const link = this.smsOrchestrationService.buildClaimLink(requestId);
const link = this.smsOrchestrationService.buildBlamePartyLink(
requestId,
targetPhone === request?.parties[0]?.person.phoneNumber
? "FIRST"
: "SECOND",
);
await this.smsOrchestrationService.sendThirdPartyDamagedPartyClaimLinkNotice(
{
receptor: targetPhone,