send required_action in gateway for when email verification is required

This commit is contained in:
Madeline
2023-02-24 23:46:52 +11:00
parent f507e15326
commit 51fe1b8955
2 changed files with 6 additions and 11 deletions
+6
View File
@@ -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