summary refs log tree commit diff
path: root/util/src
diff options
context:
space:
mode:
authorMaddy <ty.carlier@gmail.com>2021-10-13 16:07:33 +1100
committerMaddy <ty.carlier@gmail.com>2021-10-13 19:19:46 +1100
commitd3853a3d7af1ec2127cb23eb6211c598347ec0be (patch)
treea83a770d7ee1fe5c38f5ef46f8ed35a881024b38 /util/src
parentMerge pull request #443 from Mr2u/master (diff)
downloadserver-d3853a3d7af1ec2127cb23eb6211c598347ec0be.tar.xz
added route /guilds/:id/prune GET count and POST prune.
Edited Member entity to include last_message_id to avoid searching for every members last message when pruning
When a message is sent through /channels/:id/messages last_message_id of sending Member is updated.
Diffstat (limited to 'util/src')
-rw-r--r--util/src/entities/Member.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/src/entities/Member.ts b/util/src/entities/Member.ts
index 7d7ac40a..19747318 100644
--- a/util/src/entities/Member.ts
+++ b/util/src/entities/Member.ts
@@ -84,6 +84,9 @@ export class Member extends BaseClassWithoutId {
 	@Column({ type: "simple-json" })
 	settings: UserGuildSettings;
 
+	@Column()
+	last_message_id: string;
+
 	// TODO: update
 	// @Column({ type: "simple-json" })
 	// read_state: ReadState;
@@ -230,6 +233,7 @@ export class Member extends BaseClassWithoutId {
 			deaf: false,
 			mute: false,
 			pending: false,
+			last_message_id: "",
 		};
 
 		await Promise.all([