From c7d144f79f9f3f199e1ec6e7ecb92648ca99d7b8 Mon Sep 17 00:00:00 2001 From: Vedal Date: Tue, 11 Jun 2024 21:27:13 +0100 Subject: [PATCH] Use latin-1 encoding --- ebs/src/modules/config.ts | 2 +- frontend/www/src/modules/pubsub.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ebs/src/modules/config.ts b/ebs/src/modules/config.ts index adbf71e..307318a 100644 --- a/ebs/src/modules/config.ts +++ b/ebs/src/modules/config.ts @@ -40,7 +40,7 @@ export async function getConfig(): Promise { export async function broadcastConfigRefresh(config: Config) { return sendPubSubMessage({ type: "config_refreshed", - data: strFromU8(compressSync(strToU8(JSON.stringify(config)))), + data: strFromU8(compressSync(strToU8(JSON.stringify(config), true))), }); } diff --git a/frontend/www/src/modules/pubsub.ts b/frontend/www/src/modules/pubsub.ts index dc9a79e..d8ebeac 100644 --- a/frontend/www/src/modules/pubsub.ts +++ b/frontend/www/src/modules/pubsub.ts @@ -10,7 +10,8 @@ Twitch.ext.listen("global", async (_t, _c, message) => { switch (pubSubMessage.type) { case "config_refreshed": - const config = JSON.parse(strFromU8(decompressSync(strToU8(pubSubMessage.data)))) as Config; + console.log(pubSubMessage.data); + const config = JSON.parse(strFromU8(decompressSync(strToU8(pubSubMessage.data, true)))) as Config; // console.log(config); await setConfig(postProcessConfig(config)); await renderRedeemButtons();