summary refs log tree commit diff
path: root/util
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-13 17:59:21 +0200
committerGitHub <noreply@github.com>2021-09-13 17:59:21 +0200
commit924f3cc39a270065fab917f113bcd7eca514c836 (patch)
tree89367fdebb4f2592b5183047b04ec4259daeaaf3 /util
parent:bug: fix In() query (diff)
parentDelete attachments of deleted messages, fix #273 (diff)
downloadserver-924f3cc39a270065fab917f113bcd7eca514c836.tar.xz
Merge pull request #355 from AlTech98/attachments
Attachments fixes
Diffstat (limited to 'util')
-rw-r--r--util/src/entities/Message.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/src/entities/Message.ts b/util/src/entities/Message.ts
index f4c7fdc7..506db71a 100644
--- a/util/src/entities/Message.ts
+++ b/util/src/entities/Message.ts
@@ -128,7 +128,7 @@ export class Message extends BaseClass {
 	sticker_items?: Sticker[];
 
 	@JoinColumn({ name: "attachment_ids" })
-	@OneToMany(() => Attachment, (attachment: Attachment) => attachment.message)
+	@OneToMany(() => Attachment, (attachment: Attachment) => attachment.message, { cascade: true })
 	attachments?: Attachment[];
 
 	@Column({ type: "simple-json" })