Skip to content

Commit

Permalink
bug-fixed: block only hidden message
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Panico committed Dec 18, 2024
1 parent 12f00cc commit 259a0f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tybotRoute/tiledeskChatbotPlugs/directives/DirMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class DirMessage {
this.token = context.token;
this.log = this.context.log;
this.supportRequest = this.context.supportRequest
this.hMessage = false
}

execute(directive, callback) {
Expand Down Expand Up @@ -70,6 +71,7 @@ class DirMessage {
}
if (directive.name === Directives.HMESSAGE) {
action.attributes.subtype = "info";
this.hMessage = true;
}
// if (directive.name === Directives.HMESSAGE) {
// action.sender = "tiledesk";
Expand All @@ -95,7 +97,7 @@ class DirMessage {
const message = action;
if (this.log) {console.log("Message to extEndpoint:", JSON.stringify(message))};

if(this.supportRequest && !this.supportRequest.draft){
if(this.hMessage && this.supportRequest && !this.supportRequest.draft){
callback();
return;
}
Expand Down

0 comments on commit 259a0f0

Please sign in to comment.