aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
Diffstat (limited to 'webAO')
-rw-r--r--webAO/packets/handlers/handleMS.ts2
-rw-r--r--webAO/viewport/utils/handleICSpeaking.ts4
2 files changed, 6 insertions, 0 deletions
diff --git a/webAO/packets/handlers/handleMS.ts b/webAO/packets/handlers/handleMS.ts
index 894db3b..1c30d55 100644
--- a/webAO/packets/handlers/handleMS.ts
+++ b/webAO/packets/handlers/handleMS.ts
@@ -159,6 +159,8 @@ export const handleMS = (args: string[]) => {
if (chatmsg.content.trim() === "") {
//blankpost
chatmsg.content = "";
+ // empty string as chatbox means hide it
+ chatmsg.chatbox = "";
}
// our own message appeared, reset the buttons
diff --git a/webAO/viewport/utils/handleICSpeaking.ts b/webAO/viewport/utils/handleICSpeaking.ts
index e2b8a29..4fe68d3 100644
--- a/webAO/viewport/utils/handleICSpeaking.ts
+++ b/webAO/viewport/utils/handleICSpeaking.ts
@@ -213,6 +213,10 @@ export const handle_ic_speaking = async (playerChatMsg: ChatMsg) => {
setChatbox(client.viewport.getChatmsg().chatbox);
resizeChatbox();
+ if (client.viewport.getChatmsg().chatbox === "") {
+ // No chatbox means hide it
+ chatContainerBox.style.opacity = "0";
+ }
if (!skipoffset) {
// Flip the character