mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
chore(federation): ✨ Add sender public key to federation debugging
This commit is contained in:
parent
f5605e6814
commit
fc98c95892
3 changed files with 18 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ import {
|
|||
} from "@lysand-org/federation";
|
||||
import { config } from "config-manager";
|
||||
import type { User } from "~packages/database-interface/user";
|
||||
import { LogLevel, LogManager } from "~packages/log-manager";
|
||||
|
||||
export const localObjectURI = (id: string) =>
|
||||
new URL(`/objects/${id}`, config.http.base_url).toString();
|
||||
|
|
@ -48,6 +49,13 @@ export const objectToInboxRequest = async (
|
|||
if (config.debug.federation) {
|
||||
// Debug request
|
||||
await debugRequest(signed);
|
||||
|
||||
// Log public key
|
||||
new LogManager(Bun.stdout).log(
|
||||
LogLevel.DEBUG,
|
||||
"Inbox.Signature",
|
||||
`Sender public key: ${author.getUser().publicKey}`,
|
||||
);
|
||||
}
|
||||
|
||||
return signed;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue