summary refs log tree commit diff
path: root/gateway/src/opcodes/Identify.ts
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-04-20 18:30:17 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-04-20 18:30:17 +1000
commit89a1258c1c2c6126ce4efaf0cffcb37724a82294 (patch)
treefd22ca5a3808d4d00291f63ebe4e02400c23259f /gateway/src/opcodes/Identify.ts
parentTrying my hand at implementing desktop voice, magic packets courtesy of that ... (diff)
parentTry catch cpu log (diff)
downloadserver-89a1258c1c2c6126ce4efaf0cffcb37724a82294.tar.xz
Merge branch 'master' into maddyrtc
Diffstat (limited to 'gateway/src/opcodes/Identify.ts')
-rw-r--r--gateway/src/opcodes/Identify.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/gateway/src/opcodes/Identify.ts b/gateway/src/opcodes/Identify.ts
index 42b3713c..4b617fdd 100644
--- a/gateway/src/opcodes/Identify.ts
+++ b/gateway/src/opcodes/Identify.ts
@@ -29,8 +29,8 @@ const experiments: any = [];
 import { check } from "./instanceOf";
 import { Recipient } from "@fosscord/util";
 
-// TODO: bot sharding
-// TODO: check priviliged intents
+// TODO: user sharding
+// TODO: check privileged intents, if defined in the config
 // TODO: check if already identified
 
 export async function onIdentify(this: WebSocket, data: Payload) {
@@ -89,7 +89,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
 				user_id: this.user_id,
 				session_id: session_id,
 				// TODO: check if status is only one of: online, dnd, offline, idle
-				status: identify.presence?.status || "online", //does the session always start as online?
+				status: identify.presence?.status || "offline", //does the session always start as online?
 				client_info: {
 					//TODO read from identity
 					client: "desktop",
@@ -103,7 +103,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
 
 	if (!user) return this.close(CLOSECODES.Authentication_failed);
 
-	if (!identify.intents) identify.intents = BigInt("0b11111111111111");
+	if (!identify.intents) identify.intents = BigInt("0x6ffffffff");
 	this.intents = new Intents(identify.intents);
 	if (identify.shard) {
 		this.shard_id = identify.shard[0];
@@ -273,7 +273,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
 		guild_join_requests: [], // TODO what is this?
 		users: users.filter((x) => x).unique(),
 		merged_members: merged_members,
-		// shard // TODO: only for bots sharding
+		// shard // TODO: only for user sharding
 	};
 
 	// TODO: send real proper data structure