added ioctl handler

This commit is contained in:
nvrl committed 2026-07-21 16:42:41 +02:00
1 parent 01677f2670
commit 914ff2b5ae
4 files changed
+264 -12

No files matched your search

+2 -3
View File
@@ -109,11 +109,10 @@ fn extract_token(raw: &str) -> Option<String> {
let mut value: serde_json::Value = serde_json::from_str(raw).ok()?;
// If the message was stringified twice (e.g. raw is a double-quoted JSON string),
// parse the inner string.
if let Some(inner) = value.as_str() {
if let Ok(parsed) = serde_json::from_str(inner) {
if let Some(inner) = value.as_str()
&& let Ok(parsed) = serde_json::from_str(inner) {
value = parsed;
}
}
// The payload is nested under `payload` and the message names itself in
// `type`; both spellings of the success type have shipped.
let kind = value.get("type")?.as_str()?;