From 8b26a37959af174027e9ae3bc3f5cdf98ae5ae82 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Mon, 16 Dec 2024 16:07:51 -0300 Subject: [PATCH] adjust test send transaction --- .../homeserver/src/routes/federation/sendTransaction.spec.ts | 4 ++-- packages/homeserver/src/routes/federation/sendTransaction.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/homeserver/src/routes/federation/sendTransaction.spec.ts b/packages/homeserver/src/routes/federation/sendTransaction.spec.ts index 7e75434a..a77ef331 100644 --- a/packages/homeserver/src/routes/federation/sendTransaction.spec.ts +++ b/packages/homeserver/src/routes/federation/sendTransaction.spec.ts @@ -136,7 +136,7 @@ describe("/send/:txnId", () => { expect(resp.status).toBe(200); expect(data).toHaveProperty("pdus"); expect(data.pdus).toStrictEqual({ - [`$${id}:synapse2`]: {}, + [id]: {}, }); }); @@ -297,7 +297,7 @@ describe("/send/:txnId using real case", () => { expect(resp.status).toBe(200); expect(data).toHaveProperty("pdus"); expect(data.pdus).toStrictEqual({ - [`$${id}:${request.pdus[0].origin}`]: {}, + [`${id}`]: {}, }); }); }); diff --git a/packages/homeserver/src/routes/federation/sendTransaction.ts b/packages/homeserver/src/routes/federation/sendTransaction.ts index 15895ba5..b9c2e3ca 100644 --- a/packages/homeserver/src/routes/federation/sendTransaction.ts +++ b/packages/homeserver/src/routes/federation/sendTransaction.ts @@ -151,7 +151,7 @@ export const sendTransactionRoute = new Elysia().put( return true; })) ) { - resultPDUs[`$${generateId(pdu)}:${pdu.origin}`] = {}; + resultPDUs[`${generateId(pdu)}`] = {}; } } }