Skip to content

Commit

Permalink
Fix wss things.
Browse files Browse the repository at this point in the history
ChatControl now should work.
  • Loading branch information
SlejmUr committed Oct 10, 2023
1 parent ec2b686 commit e685954
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions PayCheckServerLib/Responses/IAM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ to get game to allow email + password auth
session.SendResponse(response.GetResponse());
return true;
}


Debugger.PrintDebug(request.Body);
var splitted = request.Body.Split("&");
Dictionary<string, string> bodyTokens = new();
foreach (var item in splitted)
Expand Down
5 changes: 3 additions & 2 deletions PayCheckServerLib/Servers/PC3Server.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ public override void OnWsConnected(HttpRequest request)
Headers.Add(headerpart.Item1.ToLower(), headerpart.Item2);
}
string id = "";
//There is a bug where this LobbySession empty and it contains the bearer token :)
if (Headers.ContainsKey("x-ab-lobbysessionid"))
//There is a bug where this LobbySession empty and it contains the bearer token :) - ONLY ON RELEASE
// On beta there is an actual ID.
if (Headers.ContainsKey("x-ab-lobbysessionid") && Headers["x-ab-lobbysessionid"].Contains("Bearer"))
{
id = Headers["x-ab-lobbysessionid"].Replace("Authorization: Bearer ", "");
}
Expand Down
2 changes: 1 addition & 1 deletion PayCheckServerLib/WSController/ChatControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static void Control(byte[] buffer, long offset, long size, PC3Session ses
case "actionQueryTopicById":
{
//PLEASE HELP ME IF THIS WORKS OR NOT.
var idk = chatbase as Chats.actionQueryTopicById;
var idk = JsonConvert.DeserializeObject<Chats.actionQueryTopicById>(str);
var party = PartyController.PartySaves.Where(x => x.Value.Id == idk.Params.TopicId.Replace("p.", "")).FirstOrDefault().Value;
if (party == null)
{
Expand Down

0 comments on commit e685954

Please sign in to comment.