mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 13:59:16 +01:00
feat(federation): ✨ Federate note deletions
This commit is contained in:
parent
431bc9c715
commit
88ad7178bf
4 changed files with 47 additions and 18 deletions
|
|
@ -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(),
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue