mirror of
https://git.joinfirefish.org/firefish/firefish.git
synced 2024-05-18 09:41:12 +02:00
30619301d3
959cc8ff37
Co-authored-by: zyoshoka <107108195+zyoshoka@users.noreply.github.com>
16 lines
437 B
TypeScript
16 lines
437 B
TypeScript
import config from "@/config/index.js";
|
|
import type { User } from "@/models/entities/user.js";
|
|
|
|
export default (object: any, user: { id: User["id"] }) => {
|
|
const activity = {
|
|
id: `${config.url}/users/${user.id}#updates/${Date.now()}`,
|
|
actor: `${config.url}/users/${user.id}`,
|
|
type: "Update",
|
|
to: ["https://www.w3.org/ns/activitystreams#Public"],
|
|
object,
|
|
published: new Date().toISOString(),
|
|
} as any;
|
|
|
|
return activity;
|
|
};
|