refactor(federation): 🚚 Move old function to User

This commit is contained in:
Jesse Wierzbinski 2024-08-27 15:50:14 +02:00
parent 3b2c0d3b5a
commit fbb845f7f8
No known key found for this signature in database
2 changed files with 17 additions and 19 deletions

View file

@ -1,16 +0,0 @@
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(),
};
};