Skip to content

Commit d71f045

Browse files
committed
fixed custom-buttons in group chat and made sure cmds are sent to assistant by default
1 parent 501f11f commit d71f045

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

www/scripts/sepiaFW.ui.customButtons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ function sepiaFW_build_ui_custom_buttons(){
165165
SepiaFW.ui.actions.openCMD(newAction);
166166
*/
167167
SepiaFW.debug.info("CustomButtons - sending button-text: " + buttonData.text);
168-
SepiaFW.client.sendInputText(buttonData.text);
168+
SepiaFW.client.sendInputText("@" + SepiaFW.assistant.id + " " + buttonData.text);
169169
}
170170

171171
return CustomButtons;

www/scripts/sepiaFW.webSocket.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1741,7 +1741,10 @@ function sepiaFW_build_webSocket_client(){
17411741
var cmd = dataset.cmd;
17421742
//the sender becomes the receiver - This workds because dataset is usually an
17431743
//action received from the assistant ... but it is kind of inconsistent with the rest :-(
1744-
var receiver = dataset.newReceiver || dataset.sender || ''; //we use newReceiver to fix the inconsistency (a bit)
1744+
var receiver = dataset.newReceiver || dataset.sender || SepiaFW.assistant.id; //we use newReceiver to fix the inconsistency (a bit)
1745+
if (receiver == "<all>"){
1746+
receiver = "";
1747+
}
17451748
//TODO: handle options in dataset?
17461749
if (dataset.options){
17471750
$.each(options, function(key, value){

0 commit comments

Comments
 (0)