feat(federation): Federate note deletions

This commit is contained in:
Jesse Wierzbinski 2024-06-05 19:25:49 -10:00
parent 431bc9c715
commit 88ad7178bf
No known key found for this signature in database
4 changed files with 47 additions and 18 deletions

View file

@ -67,3 +67,18 @@ export const objectToInboxRequest = async (
return signed;
};
export const undoFederationRequest = (
undoer: User,
uri: string,
): typeof EntityValidator.$Undo => {
const id = crypto.randomUUID();
return {
type: "Undo",
id,
author: undoer.getUri(),
created_at: new Date().toISOString(),
object: uri,
uri: new URL(`/undos/${id}`, config.http.base_url).toString(),
};
};