From 50e3f3a03f9da1570f772867e64db77ce6540e1c Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Sun, 30 Jun 2024 02:57:42 +0900 Subject: [PATCH] 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 --- rpc.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpc.go b/rpc.go index 57b2258..d96c970 100644 --- a/rpc.go +++ b/rpc.go @@ -68,6 +68,9 @@ func (p payload) traceCommand(command string) *string { } func (p payload) nonce(n string) bool { + if n == "initial-ready" { + return true + } return p.Nonce == n }