From 68b517a336f2d73235135983eff4dd3d8612c598 Mon Sep 17 00:00:00 2001 From: spinline Date: Fri, 6 Feb 2026 01:17:01 +0300 Subject: [PATCH] fix: use JavaScript for base64 decoding to avoid UTF-8 encoding issues (65 bytes expected) --- frontend/src/store.rs | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/frontend/src/store.rs b/frontend/src/store.rs index bf831a9..174fa92 100644 --- a/frontend/src/store.rs +++ b/frontend/src/store.rs @@ -527,6 +527,7 @@ pub async fn subscribe_to_push_notifications() { } /// Helper to convert URL-safe base64 string to Uint8Array +/// Uses JavaScript to properly decode binary data (avoids UTF-8 encoding issues) fn url_base64_to_uint8array(base64_string: &str) -> Result { // Add padding let padding = (4 - (base64_string.len() % 4)) % 4; @@ -536,15 +537,24 @@ fn url_base64_to_uint8array(base64_string: &str) -> Result()?; Ok(array) }