Cache messages on receipt, remove from cache when processed
FREEBIE
This commit is contained in:
parent
e6859a3684
commit
bd0050b6c6
13 changed files with 683 additions and 118 deletions
28
libtextsecure/storage/unprocessed.js
Normal file
28
libtextsecure/storage/unprocessed.js
Normal 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);
|
||||
},
|
||||
};
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue