blob: b9a1ac33e0556ab70a6d61405da2995161816e2a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import { APActivity } from "activitypub-types";
import { Column, Entity } from "typeorm";
import { Config } from "..";
import { BaseClass } from "./BaseClass";
@Entity("federation_activities")
export class FederationActivity extends BaseClass {
@Column({ type: "simple-json" })
data: APActivity;
toJSON(): APActivity {
const { host } = Config.get().federation;
return {
id: `https://${host}/federation/activities/${this.id}`,
...this.data,
};
}
}
|