mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Add public timeline
This commit is contained in:
parent
bff170d2e2
commit
b7587f8d3f
9 changed files with 158 additions and 7 deletions
|
|
@ -1,11 +1,19 @@
|
|||
/* eslint-disable @typescript-eslint/require-await */
|
||||
import { BaseEntity, Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
||||
import {
|
||||
BaseEntity,
|
||||
Column,
|
||||
Entity,
|
||||
JoinTable,
|
||||
ManyToMany,
|
||||
PrimaryGeneratedColumn,
|
||||
} from "typeorm";
|
||||
import { APActor, APImage, APOrderedCollectionPage } from "activitypub-types";
|
||||
import { getConfig, getHost } from "@config";
|
||||
import { appendFile } from "fs/promises";
|
||||
import { errorResponse } from "@response";
|
||||
import { APIAccount } from "~types/entities/account";
|
||||
import { RawActivity } from "./RawActivity";
|
||||
import { RawObject } from "./RawObject";
|
||||
|
||||
/**
|
||||
* Represents a raw actor entity in the database.
|
||||
|
|
@ -30,6 +38,13 @@ export class RawActor extends BaseEntity {
|
|||
@Column("jsonb", { default: [] })
|
||||
followers!: string[];
|
||||
|
||||
/**
|
||||
* The list of featured objects associated with the actor.
|
||||
*/
|
||||
@ManyToMany(() => RawObject, { nullable: true })
|
||||
@JoinTable()
|
||||
featured!: RawObject[];
|
||||
|
||||
/**
|
||||
* Retrieves a RawActor entity by actor ID.
|
||||
* @param id The ID of the actor to retrieve.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue