diff --git a/HISTORY.md b/HISTORY.md index 98481d7..9c2b333 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,4 +1,7 @@ # mage-message-stream.js changelog +## v0.1.1 + * Expose which message IDs have not yet been confirmed through getUnconfirmed() + ## v0.1.0 - * Initial Release \ No newline at end of file + * Initial Release diff --git a/http.js b/http.js index 4f51976..65d4136 100644 --- a/http.js +++ b/http.js @@ -108,6 +108,11 @@ function HttpPollingClient(style, cfg) { }; + this.getUnconfirmed = function () { + return confirmIds.slice(); + }; + + this.abort = function () { hr.abort(); this.isRunning = false; diff --git a/ws.js b/ws.js index 7a18575..af5b801 100644 --- a/ws.js +++ b/ws.js @@ -118,6 +118,11 @@ function WebSocketClient(cfg) { }; + this.getUnconfirmed = function () { + return confirmIds.slice(); + }; + + this.abort = function () { if (ws) { ws.onclose = null;