From 6df0673c8e299630c4b4d5d33a5f4e34ead19f71 Mon Sep 17 00:00:00 2001 From: Andy Burke Date: Fri, 12 Sep 2025 12:06:12 -0700 Subject: [PATCH] fix: fix message submission --- public/index.html | 10 +++++----- public/tabs/chat/chat.html | 16 +++++++++++----- public/tabs/chat/chat.js | 8 ++++---- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/public/index.html b/public/index.html index 4fc4b3a..8a5dac6 100644 --- a/public/index.html +++ b/public/index.html @@ -54,7 +54,7 @@ topic_changed: { detail: { previous, - topic: topic_id + topic_id } } }); @@ -62,7 +62,7 @@ document.dispatchEvent(new CustomEvent( "topic_changed", { detail: { previous, - topic: topic_id + topic_id } })); } @@ -89,14 +89,14 @@ } } window.addEventListener("locationchange", extract_url_hash_info); - document.addEventListener( 'topic_changed', ( {detail: { topic }}) => { - if ( !topic ) { + document.addEventListener( 'topic_changed', ( {detail: { topic_id }}) => { + if ( !topic_id ) { const first_topic_id = TOPICS?.[0]?.id; if ( first_topic_id ) { window.location.hash = `/topic/${ first_topic_id }/chat`; } } - }) + }); let TOPICS = []; let last_topic_update = undefined; diff --git a/public/tabs/chat/chat.html b/public/tabs/chat/chat.html index 5a46056..eb70377 100644 --- a/public/tabs/chat/chat.html +++ b/public/tabs/chat/chat.html @@ -43,9 +43,10 @@