Add new inbox endpoint

This commit is contained in:
Jesse Wierzbinski 2023-09-12 17:06:47 -10:00
parent e618996936
commit 1027eada7c
No known key found for this signature in database
GPG key ID: F9A1E418934E40B0
5 changed files with 110 additions and 16 deletions

View file

@ -0,0 +1,27 @@
import {
BaseEntity,
Column,
Entity,
ManyToMany,
PrimaryGeneratedColumn,
} from "typeorm";
import { APActivity } from "activitypub-types";
import { RawObject } from "./RawObject";
/**
* Stores an ActivityPub activity as raw JSON-LD data
*/
@Entity({
name: "activities",
})
export class RawActivity extends BaseEntity {
@PrimaryGeneratedColumn("uuid")
id!: string;
@Column("json")
data!: APActivity;
// Any associated objects (there is typically only one)
@ManyToMany(() => RawObject, object => object.id)
objects!: RawObject[];
}