In the chat UI that I made, I connect with directline as indicated in the docs (var directLine = new DirectLine.DirectLine({secret: directLineSecret});) it works perfectly with Chrome and Microsoft Edge, but with firefox it just doesn't connect. When typing in the console the command, it creates a directLine object without a conversation id; therefore, everything that I type doesn't get a response.
Here's is how I create the DirectLine object
Also my listener when posting activities to directLine prints in console a message with the id on success, and the error otherwise, but none of the listeners is executing.
var dlobj = new DirectLine.DirectLine({secret: "myDirectLineSecret"});
var activity = {
from:{
id:"User",
name: "User"
},
type: "message",
text: "I'm here"
};
dlobj.postActivity(activity)
.subscribe(
id => console.log("Success: ",id),
error => console.log("Error: ", error)
);
Output in Chrome:
"Success: A2CflFKTt5j11hPQcDtte|0000001"
In firefox no message is printed, nor error nor success.
Anybody has any idea of the reason this happens?
The only possible cause was, in effect, a difference in permissions of firefox and Chrome.