summary refs log tree commit diff
path: root/src/gateway
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-08-21 23:28:36 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-08-21 23:28:36 +1000
commitccc774168a0612c6892b7862141e58b28b029aec (patch)
treefa4d8348abd9bfbef1d75b5364069ca408cb5a2d /src/gateway
parentremove INVALID_PASSWORD error response. close #1090 (diff)
downloadserver-ccc774168a0612c6892b7862141e58b28b029aec.tar.xz
Close #1091
Diffstat (limited to 'src/gateway')
-rw-r--r--src/gateway/opcodes/Identify.ts52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts
index 7610901a..0f5469cf 100644
--- a/src/gateway/opcodes/Identify.ts
+++ b/src/gateway/opcodes/Identify.ts
@@ -17,43 +17,43 @@
 */
 
 import {
-	WebSocket,
-	Payload,
-	setupListener,
-	Capabilities,
 	CLOSECODES,
+	Capabilities,
 	OPCODES,
+	Payload,
 	Send,
+	WebSocket,
+	setupListener,
 } from "@spacebar/gateway";
 import {
-	checkToken,
+	Application,
+	Config,
+	DMChannel,
+	DefaultUserGuildSettings,
+	EVENTEnum,
+	Guild,
+	GuildOrUnavailable,
+	IdentifySchema,
 	Intents,
 	Member,
-	ReadyEventData,
-	Session,
-	EVENTEnum,
-	Config,
-	PublicUser,
-	PrivateUserProjection,
-	ReadState,
-	Application,
-	emitEvent,
-	SessionsReplace,
-	PrivateSessionProjection,
 	MemberPrivateProjection,
+	OPCodes,
+	Permissions,
 	PresenceUpdateEvent,
-	IdentifySchema,
-	DefaultUserGuildSettings,
-	ReadyGuildDTO,
-	Guild,
+	PrivateSessionProjection,
+	PrivateUserProjection,
+	PublicUser,
 	PublicUserProjection,
+	ReadState,
+	ReadyEventData,
+	ReadyGuildDTO,
 	ReadyUserGuildSettingsEntries,
-	UserSettings,
-	Permissions,
-	DMChannel,
-	GuildOrUnavailable,
 	Recipient,
-	OPCodes,
+	Session,
+	SessionsReplace,
+	UserSettings,
+	checkToken,
+	emitEvent,
 } from "@spacebar/util";
 import { check } from "./instanceOf";
 
@@ -332,7 +332,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
 		// TODO how is active determined?
 		// in our lazy request impl, we just pick the 'most relevant' session
 		active: x.session_id == session.session_id,
-		activities: x.activities,
+		activities: x.activities ?? [],
 		client_info: x.client_info,
 		// TODO: what does all mean?
 		session_id: x.session_id == session.session_id ? "all" : x.session_id,