Added hermes websocket support. Added chat command support. Added selectable voice command via websocket. Added websocket heartbeat management.

This commit is contained in:
Tom
2024-03-15 12:27:35 +00:00
parent b5cc6b5706
commit d4004d6230
53 changed files with 1227 additions and 461 deletions

View File

@@ -25,15 +25,14 @@ namespace TwitchChatTTS.OBS.Socket.Handlers
return;
Logger.LogTrace("OBS websocket password: " + Context.Password);
if (obj.authentication is null || Context.Password is null) // TODO: send re-identify message.
if (obj.Authentication == null || Context.Password == null) // TODO: send re-identify message.
return;
var salt = obj.authentication.salt;
var challenge = obj.authentication.challenge;
var salt = obj.Authentication.Salt;
var challenge = obj.Authentication.Challenge;
Logger.LogTrace("Salt: " + salt);
Logger.LogTrace("Challenge: " + challenge);
string secret = Context.Password + salt;
byte[] bytes = Encoding.UTF8.GetBytes(secret);
string hash = null;
@@ -48,8 +47,7 @@ namespace TwitchChatTTS.OBS.Socket.Handlers
}
Logger.LogTrace("Final hash: " + hash);
//await sender.Send(1, new IdentifyMessage(obj.rpcVersion, hash, 1023 | 262144 | 524288));
await sender.Send(1, new IdentifyMessage(obj.rpcVersion, hash, 1023 | 262144));
await sender.Send(1, new IdentifyMessage(obj.RpcVersion, hash, 1023 | 262144));
}
}
}