mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
17 lines
448 B
TypeScript
17 lines
448 B
TypeScript
import type { Unfollow } from "@versia/federation/types";
|
|
import type { User } from "~/packages/database-interface/user";
|
|
|
|
export const unfollowFederationRequest = (
|
|
unfollower: User,
|
|
unfollowing: User,
|
|
): Unfollow => {
|
|
const id = crypto.randomUUID();
|
|
return {
|
|
type: "Unfollow",
|
|
id,
|
|
author: unfollower.getUri(),
|
|
created_at: new Date().toISOString(),
|
|
followee: unfollowing.getUri(),
|
|
};
|
|
};
|