mirror of
https://github.com/MisskeyIO/misskey
synced 2025-01-11 04:13:27 +09:00
cbb7e95d82
* implement sending AP Flag object Optionally allow a user to select to forward a report about a remote user to the other instance. This is added in a backwards-compatible way. * add locale string * forward report only for moderators * add switch to moderator UI to forward report * fix report note url * return forwarded status from API apparently forgot to carry this over from my testing environment * object in Flag activity has to be an array For correct interoperability with Pleroma the "object" property of the Flag activity has to be an array. This array will in the future also hold the link to respective notes, so it makes sense to correct this on our side. * Update get-note-menu.ts Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
80 lines
1.4 KiB
TypeScript
80 lines
1.4 KiB
TypeScript
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
|
import { User } from './user';
|
|
import { id } from '../id';
|
|
|
|
@Entity()
|
|
export class AbuseUserReport {
|
|
@PrimaryColumn(id())
|
|
public id: string;
|
|
|
|
@Index()
|
|
@Column('timestamp with time zone', {
|
|
comment: 'The created date of the AbuseUserReport.',
|
|
})
|
|
public createdAt: Date;
|
|
|
|
@Index()
|
|
@Column(id())
|
|
public targetUserId: User['id'];
|
|
|
|
@ManyToOne(type => User, {
|
|
onDelete: 'CASCADE',
|
|
})
|
|
@JoinColumn()
|
|
public targetUser: User | null;
|
|
|
|
@Index()
|
|
@Column(id())
|
|
public reporterId: User['id'];
|
|
|
|
@ManyToOne(type => User, {
|
|
onDelete: 'CASCADE',
|
|
})
|
|
@JoinColumn()
|
|
public reporter: User | null;
|
|
|
|
@Column({
|
|
...id(),
|
|
nullable: true,
|
|
})
|
|
public assigneeId: User['id'] | null;
|
|
|
|
@ManyToOne(type => User, {
|
|
onDelete: 'SET NULL',
|
|
})
|
|
@JoinColumn()
|
|
public assignee: User | null;
|
|
|
|
@Index()
|
|
@Column('boolean', {
|
|
default: false,
|
|
})
|
|
public resolved: boolean;
|
|
|
|
@Column('boolean', {
|
|
default: false
|
|
})
|
|
public forwarded: boolean;
|
|
|
|
@Column('varchar', {
|
|
length: 2048,
|
|
})
|
|
public comment: string;
|
|
|
|
//#region Denormalized fields
|
|
@Index()
|
|
@Column('varchar', {
|
|
length: 128, nullable: true,
|
|
comment: '[Denormalized]',
|
|
})
|
|
public targetUserHost: string | null;
|
|
|
|
@Index()
|
|
@Column('varchar', {
|
|
length: 128, nullable: true,
|
|
comment: '[Denormalized]',
|
|
})
|
|
public reporterHost: string | null;
|
|
//#endregion
|
|
}
|