add some debug info
This commit is contained in:
parent
b0a0f12479
commit
0c34cd0fab
1 changed files with 5 additions and 1 deletions
|
@ -416,12 +416,16 @@ websocketServer.on("connection", (socket) => {
|
|||
if (reader.length > 0 && reader.length < 50) {
|
||||
switch (reader.readUByte()) {
|
||||
case MessageType.ClientDetails:
|
||||
{
|
||||
if (user !== undefined) {
|
||||
Console.printInfo("Tried to ClientDetails when already connected and ready!");
|
||||
return;
|
||||
}
|
||||
const apiKey = reader.readShortString();
|
||||
const rawURL = reader.readString();
|
||||
const dbUser = await UserService.GetUserByAPIKey(apiKey);
|
||||
if (dbUser == null) {
|
||||
Console.printInfo("User for apiKey " + apiKey + " was null!");
|
||||
return;
|
||||
}
|
||||
const dbUserParty = await UserService.GetActiveParty(dbUser.Id);
|
||||
|
@ -430,7 +434,6 @@ websocketServer.on("connection", (socket) => {
|
|||
dbParty = await UserService.GetParty(dbUserParty.PartyId);
|
||||
}
|
||||
|
||||
const rawURL = reader.readString();
|
||||
let page = rawURL.toLowerCase().replace(".htm", "").replace(".html", "");
|
||||
if (page === "index") {
|
||||
page = "";
|
||||
|
@ -456,6 +459,7 @@ websocketServer.on("connection", (socket) => {
|
|||
user.send(usersToSend.toBuffer());
|
||||
sendGroupUpdate(user);
|
||||
break;
|
||||
}
|
||||
case MessageType.CursorPos:
|
||||
{
|
||||
if (user === undefined) {
|
||||
|
|
Loading…
Reference in a new issue