summary refs log tree commit diff
path: root/src/gateway/opcodes
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-02-24 23:46:52 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-02-24 23:46:52 +1100
commit51fe1b8955e8c7ca4ef1b3eda6a5cea769a9e191 (patch)
tree75e5fd23da11644e937b4bb8e69f5d1310c5ca97 /src/gateway/opcodes
parentMerge pull request #984 from fosscord/dependabot/npm_and_yarn/http-cache-sema... (diff)
downloadserver-51fe1b8955e8c7ca4ef1b3eda6a5cea769a9e191.tar.xz
send required_action in gateway for when email verification is required
Diffstat (limited to 'src/gateway/opcodes')
-rw-r--r--src/gateway/opcodes/Identify.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts
index 030ca66e..1a632b84 100644
--- a/src/gateway/opcodes/Identify.ts
+++ b/src/gateway/opcodes/Identify.ts
@@ -320,6 +320,12 @@ export async function onIdentify(this: WebSocket, data: Payload) {
 		merged_members: merged_members,
 		// shard // TODO: only for user sharding
 		sessions: [], // TODO:
+
+		// lol hack whatever
+		required_action:
+			Config.get().login.requireVerification && !user.verified
+				? "REQUIRE_VERIFIED_EMAIL"
+				: undefined,
 	};
 
 	// TODO: send real proper data structure