diff --git a/apps/api-gateway/src/connection/connection.service.ts b/apps/api-gateway/src/connection/connection.service.ts index bb7877a80..55802cb80 100644 --- a/apps/api-gateway/src/connection/connection.service.ts +++ b/apps/api-gateway/src/connection/connection.service.ts @@ -24,6 +24,16 @@ export class ConnectionService extends BaseService { } } + sendBasicMessage( + basicMessageDto: BasicMessageDto + ): Promise { + try { + return this.sendNatsMessage(this.connectionServiceProxy, 'send-basic-message', basicMessageDto); + } catch (error) { + throw new RpcException(error.response); + } + } + getConnectionWebhook( connectionDto: ConnectionDto, orgId: string diff --git a/apps/connection/src/connection.service.ts b/apps/connection/src/connection.service.ts index 62f4469c6..3373b50dd 100644 --- a/apps/connection/src/connection.service.ts +++ b/apps/connection/src/connection.service.ts @@ -618,7 +618,8 @@ export class ConnectionService { orgId, routing, recipientKey, - invitationDid + invitationDid, + IsReuseConnection } = payload?.createOutOfBandConnectionInvitation; const agentDetails = await this.connectionRepository.getAgentEndPoint( @@ -630,6 +631,21 @@ export class ConnectionService { if (!agentDetails) { throw new NotFoundException(ResponseMessages.connection.error.agentEndPointNotFound); } + + let legacyinvitationDid; + if (IsReuseConnection) { + const data: agent_invitations[] = await this.connectionRepository.getInvitationDidByOrgId(orgId); + if (data && 0 < data.length) { + const [firstElement] = data; + legacyinvitationDid = firstElement?.invitationDid ?? undefined; + + this.logger.log('legacyinvitationDid:', legacyinvitationDid); + } + } + const connectionInvitationDid = invitationDid ? invitationDid : legacyinvitationDid; + + this.logger.log('connectionInvitationDid:', connectionInvitationDid); + this.logger.log(`logoUrl:::, ${organisation.logoUrl}`); const connectionPayload = { @@ -646,7 +662,7 @@ export class ConnectionService { routing: routing || undefined, messages: messages || undefined, recipientKey: recipientKey || undefined, - invitationDid: invitationDid || undefined + invitationDid: connectionInvitationDid || undefined }; const createConnectionInvitationFlag = 'connection-invitation'; diff --git a/apps/user/src/user.service.ts b/apps/user/src/user.service.ts index c8b2feef9..cf47485db 100644 --- a/apps/user/src/user.service.ts +++ b/apps/user/src/user.service.ts @@ -127,7 +127,7 @@ export class UserService { throw new NotFoundException(ResponseMessages.user.error.redirectUrlNotFound); } - sendVerificationMail = await this.sendEmailForVerification(email, verifyCode, redirectUrl, decryptClientId, brandLogoUrl, platformName); + sendVerificationMail = await this.sendEmailForVerification(email, verifyCode, redirectUrl, clientId, brandLogoUrl, platformName); } catch (error) { throw new InternalServerErrorException(ResponseMessages.user.error.emailSend); } diff --git a/apps/verification/src/verification.service.ts b/apps/verification/src/verification.service.ts index e5ddd8948..32a76ca75 100644 --- a/apps/verification/src/verification.service.ts +++ b/apps/verification/src/verification.service.ts @@ -813,7 +813,6 @@ export class VerificationService { } }); } - // For Indy format if (getProofPresentationById?.response?.request?.indy) { const requestedAttributes = getProofPresentationById?.response?.request?.indy?.requested_attributes;