Commit Graph

3 Commits

Author SHA1 Message Date
Ophestra Umiker 50e3f3a03f
library: rpc: do not validate nonce of initial response
Yet another inconsistency between arRPC and Discord RPC, Discord RPC does not send a nonce at all. Now we internally treat "initial-ready" as a magic string to bypass nonce validation.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-06-30 02:57:42 +09:00
Ophestra Umiker 8a975f9a31
rpc: handle response with Identify opcode as retryable
Sometimes arRPC would just send a response with the Identify opcode and `{"cmd":""}`. It is unclear what causes this and the easiest way to recover that I'm aware of is to close the connection and start a fresh one.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-06-21 21:55:04 +09:00
Ophestra Umiker 7074a1a950
library: rpc: many RPC data types and client handshake activation
Add a few internal validation functions to make validation cleaner, activation function is called as needed so explicit client activation is not required.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-06-19 23:16:43 +09:00