diff --git a/scripts/communityScripts/armored-chat/armored_chat.js b/scripts/communityScripts/armored-chat/armored_chat.js index 27f40b3a15..4bc75f9345 100644 --- a/scripts/communityScripts/armored-chat/armored_chat.js +++ b/scripts/communityScripts/armored-chat/armored_chat.js @@ -152,10 +152,12 @@ switch (event.action) { case "erase_history": Settings.setValue("ArmoredChat-Messages", []); + _emitEvent({ + type: "clear_messages", + }); break; } break; - case "initialized": // https://github.com/overte-org/overte/issues/824 chat_overlay_window.visible = app_is_visible; // The "visible" field in the Desktop.createWindow does not seem to work. Force set it to the initial state (false) @@ -201,7 +203,6 @@ _emitEvent({ type: "avatar_connected", ...message }); }, 1500); } - function _loadSettings() { message_history.forEach((message) => { delete message.action; diff --git a/scripts/communityScripts/armored-chat/armored_chat.qml b/scripts/communityScripts/armored-chat/armored_chat.qml index af3314cc99..9b313162fe 100644 --- a/scripts/communityScripts/armored-chat/armored_chat.qml +++ b/scripts/communityScripts/armored-chat/armored_chat.qml @@ -452,6 +452,9 @@ Rectangle { case "avatar_connected": addMessage("SYSTEM", message.message, `[ ${time} - ${date} ]`, "domain", "notification"); break; + case "clear_messages": + local.clear() + domain.clear() } }