Closed jackdh closed 5 years ago
Yes, it appears that IE is unsupported since this commit: https://github.com/howdyai/botkit-starter-web/commit/6918855b554c4bb1953617112ab1e7cd55c9ad18
You could try to use an older version if you need IE support.
For people also with this issue it can be solves by rolling back the promise to use callbacks.
request: function (url, body, success, error) {
that = this;
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == XMLHttpRequest.DONE) {
if (xmlhttp.status == 200) {
var response = xmlhttp.responseText;
var message = null;
try {
message = JSON.parse(response);
} catch (err) {
error(err);
return;
}
success(message);
} else {
error(new Error('status_' + xmlhttp.status));
}
}
};
xmlhttp.open("POST", url, true);
xmlhttp.setRequestHeader("Content-Type", "application/json");
xmlhttp.send(JSON.stringify(body));
}
getHistory: function (guid) {
that = this;
if (that.guid) {
that.request('/botkit/history', {user: that.guid}, function(history) {
if (history.success) {
that.trigger('history_loaded', history.history);
} else {
that.trigger('history_error', new Error(history.error));
}
}, function(err) {
that.trigger('history_error', err);
});
}
},
webhook: function (message) {
that = this;
that.request('/botkit/receive', message, function(data) {
that.trigger(data.type, data);
}, function(data) {
that.trigger('webhook_error', data);
});
},
I'm also currently working on converting this project to use Socket.io due to the nice fall backs it has to older browsers, it's working exceptionally well so might be worth a discussion to include it?
@jackdh yes, please send a pull request with your Socket.io support!
Sure I'm still cleaning up bot.js and client.js, however I've pushed the new Sockets.js to my fork
Hi All, I included Polyfill js and it worked like a charm without any code changes!
I'm getting the following error when attempting to spin this up and run it in IE.
Which links to