diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-03 22:53:01 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-03 22:53:01 +0200 |
commit | 2f7182ca3d8568aca24a73a6b6dc8da0f5fa6747 (patch) | |
tree | 928b1ccdec95a799afa1fb8b90716bac2c9a9d05 /util/src/entities/Message.ts | |
parent | Merge pull request #411 from afeuerstein/master (diff) | |
download | server-2f7182ca3d8568aca24a73a6b6dc8da0f5fa6747.tar.xz |
:bug: fix message reactions
Diffstat (limited to 'util/src/entities/Message.ts')
-rw-r--r-- | util/src/entities/Message.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/util/src/entities/Message.ts b/util/src/entities/Message.ts index c4901693..04c3c7aa 100644 --- a/util/src/entities/Message.ts +++ b/util/src/entities/Message.ts @@ -74,9 +74,7 @@ export class Message extends BaseClass { author_id: string; @JoinColumn({ name: "author_id", referencedColumnName: "id" }) - @ManyToOne(() => User, { - onDelete: "CASCADE", - }) + @ManyToOne(() => User) author?: User; @Column({ nullable: true }) @@ -120,7 +118,7 @@ export class Message extends BaseClass { mention_everyone?: boolean; @JoinTable({ name: "message_user_mentions" }) - @ManyToMany(() => User, { orphanedRowAction: "delete", onDelete: "CASCADE", cascade: true }) + @ManyToMany(() => User) mentions: User[]; @JoinTable({ name: "message_role_mentions" }) |