summary refs log tree commit diff
path: root/gateway
diff options
context:
space:
mode:
Diffstat (limited to 'gateway')
-rw-r--r--gateway/src/opcodes/Identify.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/gateway/src/opcodes/Identify.ts b/gateway/src/opcodes/Identify.ts
index 88c9b942..9eb4cd32 100644
--- a/gateway/src/opcodes/Identify.ts
+++ b/gateway/src/opcodes/Identify.ts
@@ -104,7 +104,10 @@ export async function onIdentify(this: WebSocket, data: Payload) {
 		}
 		return x.channel;
 	});
-	const user = await User.findOneOrFail({ id: this.user_id });
+	const user = await User.findOneOrFail({
+		where: { id: this.user_id },
+		relations: ["relationships", "relationships.to"],
+	});
 	if (!user) return this.close(CLOSECODES.Authentication_failed);
 
 	const public_user = {
@@ -171,7 +174,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
 		}),
 		guild_experiments: [], // TODO
 		geo_ordered_rtc_regions: [], // TODO
-		relationships: user.relationships,
+		relationships: user.relationships.map((x) => x.toPublicRelationship()),
 		read_state: {
 			// TODO
 			entries: [],