18 lines
400 B
TypeScript
18 lines
400 B
TypeScript
import { config } from "@/config.js";
|
|
import type { ILocalUser } from "@/models/entities/user.js";
|
|
|
|
// to anonymise reporters, the reporting actor must be a system user
|
|
// object has to be a uri or array of uris
|
|
export const renderFlag = (
|
|
user: ILocalUser,
|
|
object: [string],
|
|
content: string,
|
|
) => {
|
|
return {
|
|
type: "Flag",
|
|
actor: `${config.url}/users/${user.id}`,
|
|
content,
|
|
object,
|
|
};
|
|
};
|