summary refs log tree commit diff
path: root/util/src/entities/Member.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-03 15:27:00 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-03 15:27:00 +0200
commitc944babc9695cd012b4a032b7dd4224ec19003f2 (patch)
treebb8bdc42f5720045017846c7a41ac9ec0b6dae70 /util/src/entities/Member.ts
parent:bug: fix member roles + list (diff)
downloadserver-c944babc9695cd012b4a032b7dd4224ec19003f2.tar.xz
:bug: fix #311
Diffstat (limited to 'util/src/entities/Member.ts')
-rw-r--r--util/src/entities/Member.ts10
1 files changed, 3 insertions, 7 deletions
diff --git a/util/src/entities/Member.ts b/util/src/entities/Member.ts
index 76febb50..4cdd3421 100644
--- a/util/src/entities/Member.ts
+++ b/util/src/entities/Member.ts
@@ -26,6 +26,7 @@ import { HTTPError } from "lambert-server";
 import { Role } from "./Role";
 import { Snowflake } from "../util/Snowflake";
 import { BaseClassWithoutId } from "./BaseClass";
+import { PublicGuildRelations } from ".";
 
 @Entity("members")
 @Index(["id", "guild_id"], { unique: true })
@@ -209,7 +210,7 @@ export class Member extends BaseClassWithoutId {
 			where: {
 				id: guild_id,
 			},
-			relations: ["channels", "emojis", "members", "roles", "stickers", "voice_states"],
+			relations: PublicGuildRelations,
 		});
 
 		if (await Member.count({ id: user.id, guild: { id: guild_id } }))
@@ -259,12 +260,7 @@ export class Member extends BaseClassWithoutId {
 					...guild,
 					members: [...guild.members, { ...member, user }],
 					member_count: (guild.member_count || 0) + 1,
-					guild_hashes: {
-						channels: { omitted: false, hash: "nkMQJ5nl5Cg" },
-						metadata: { omitted: false, hash: "+5ybMfcb8iw" },
-						roles: { omitted: false, hash: "Idhc6P9ktfM" },
-						version: 1,
-					},
+					guild_hashes: {},
 					guild_scheduled_events: [],
 					joined_at: member.joined_at,
 					presences: [],