From 0893b7d5a416384f4ba789269249eb95d4fa7a50 Mon Sep 17 00:00:00 2001 From: Erik Jespersen <42016062+Mookse@users.noreply.github.com> Date: Tue, 4 Jun 2024 00:41:03 -0400 Subject: [PATCH] 20240604 @Mookse (#233) - isValidating/isCreatingAccount fix --- inc/js/mylife-agent-factory.mjs | 4 ++-- inc/js/mylife-avatar.mjs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/js/mylife-agent-factory.mjs b/inc/js/mylife-agent-factory.mjs index ca0bb68..5b1eb29 100644 --- a/inc/js/mylife-agent-factory.mjs +++ b/inc/js/mylife-agent-factory.mjs @@ -898,7 +898,7 @@ class MyLifeFactory extends AgentFactory { * @returns {boolean} - Avatar is in `accountCreation` mode (true) or not (false). */ get isCreatingAccount(){ - return this.#mylifeRegistrationData!==null + return this.#mylifeRegistrationData!=null } /** * Test whether factory is currently `validating` a session. @@ -906,7 +906,7 @@ class MyLifeFactory extends AgentFactory { * @returns {boolean} - Avatar is in `registering` mode (true) or not (false). */ get isValidating(){ - return this.#tempRegistrationData!==null + return this.#tempRegistrationData!=null } } // private module functions diff --git a/inc/js/mylife-avatar.mjs b/inc/js/mylife-avatar.mjs index cc15796..b400cd1 100644 --- a/inc/js/mylife-avatar.mjs +++ b/inc/js/mylife-avatar.mjs @@ -143,6 +143,7 @@ class Avatar extends EventEmitter { chatMessage = `CONFIRM REGISTRATION: ${ chatMessage }` if(this.isCreatingAccount) chatMessage = `CREATE ACCOUNT: ${ chatMessage }` + console.log('chatRequest::MyLife', activeBotId, threadId, chatMessage) } if(!chatMessage) throw new Error('No message provided in context')