Cache messages on receipt, remove from cache when processed

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-07-17 15:46:00 -07:00
parent e6859a3684
commit bd0050b6c6
13 changed files with 683 additions and 118 deletions

View file

@ -0,0 +1,28 @@
/*
* vim: ts=4:sw=4:expandtab
*/
;(function() {
'use strict';
/*****************************************
*** Not-yet-processed message storage ***
*****************************************/
window.textsecure = window.textsecure || {};
window.textsecure.storage = window.textsecure.storage || {};
window.textsecure.storage.unprocessed = {
getAll: function() {
return textsecure.storage.protocol.getAllUnprocessed();
},
add: function(data) {
return textsecure.storage.protocol.addUnprocessed(data);
},
update: function(id, updates) {
return textsecure.storage.protocol.updateUnprocessed(id, updates);
},
remove: function(id) {
return textsecure.storage.protocol.removeUnprocessed(id);
},
};
})();