From 75043bae15764cefc5a38ee6fb1244d900a09f6d Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Thu, 23 May 2024 19:46:22 -1000 Subject: [PATCH] feat(federation): :sparkles: Log signed string to debug as well --- bun.lockb | Bin 279340 -> 279340 bytes database/entities/Federation.ts | 9 ++++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bun.lockb b/bun.lockb index 3f5811bc01efa1a0ed4e743253d04f1488d69748..48a61ffdee48e10e612584eb0be74ccccfa38c52 100755 GIT binary patch delta 146 zcmV;D0B!%Qh7qiW5s)q*KFbF4wy%SSQZN1>_7k3(y}RpGkC8cRuP7!8pL^9Wu}=Da zlZZwzvv_}%^FZHP_yL|@Ym-hWnHy>^x;mccgP#;1;M1& delta 149 zcmV;G0BZlNh7qiW5s)q*9VjvOHXg^nDb!PuHFmrjg!vD`3)uaYH)))k7HTIBu}=Da zlZZ+%vv_}%^FY@>z+c~(CRH-V6x>|v)I4$o_YGiqPH&o9Yp2&NPI9RG&n@=%p!a1t zojkMg%XcdeLQ&DUowO{TK>%8|xqF9Aa{-4ztz DR>?$E diff --git a/database/entities/Federation.ts b/database/entities/Federation.ts index fc1ac71f..9da3c78a 100644 --- a/database/entities/Federation.ts +++ b/database/entities/Federation.ts @@ -44,7 +44,7 @@ export const objectToInboxRequest = async ( body: JSON.stringify(object), }); - const signed = await ctor.sign(request); + const { request: signed, signedString } = await ctor.sign(request); if (config.debug.federation) { // Debug request @@ -56,6 +56,13 @@ export const objectToInboxRequest = async ( "Inbox.Signature", `Sender public key: ${author.getUser().publicKey}`, ); + + // Log signed string + new LogManager(Bun.stdout).log( + LogLevel.DEBUG, + "Inbox.Signature", + `Signed string:\n${signedString}`, + ); } return signed;