mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
feat(federation): ✨ Log signed string to debug as well
This commit is contained in:
parent
fd59d9ebae
commit
75043bae15
|
|
@ -44,7 +44,7 @@ export const objectToInboxRequest = async (
|
||||||
body: JSON.stringify(object),
|
body: JSON.stringify(object),
|
||||||
});
|
});
|
||||||
|
|
||||||
const signed = await ctor.sign(request);
|
const { request: signed, signedString } = await ctor.sign(request);
|
||||||
|
|
||||||
if (config.debug.federation) {
|
if (config.debug.federation) {
|
||||||
// Debug request
|
// Debug request
|
||||||
|
|
@ -56,6 +56,13 @@ export const objectToInboxRequest = async (
|
||||||
"Inbox.Signature",
|
"Inbox.Signature",
|
||||||
`Sender public key: ${author.getUser().publicKey}`,
|
`Sender public key: ${author.getUser().publicKey}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Log signed string
|
||||||
|
new LogManager(Bun.stdout).log(
|
||||||
|
LogLevel.DEBUG,
|
||||||
|
"Inbox.Signature",
|
||||||
|
`Signed string:\n${signedString}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return signed;
|
return signed;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue