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/component.json b/component.json index 6a5743c..d6fed61 100644 --- a/component.json +++ b/component.json @@ -1,7 +1,7 @@ { "name": "mage-message-stream.js", "repo": "mage/message-stream.js", - "version": "0.1.0", + "version": "0.1.1", "description": "MAGE's message stream", "dependencies": { "component/emitter": "1.1.3", 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;