signal-desktop/libtextsecure/storage/unprocessed.js

26 lines
754 B
JavaScript
Raw Normal View History

2018-07-21 21:51:20 +00:00
/* global window, textsecure */
2018-07-21 21:51:20 +00:00
// eslint-disable-next-line func-names
(function() {
/** ***************************************
2018-05-02 16:51:22 +00:00
*** Not-yet-processed message storage ***
2018-07-21 21:51:20 +00:00
**************************************** */
2018-05-02 16:51:22 +00:00
window.textsecure = window.textsecure || {};
window.textsecure.storage = window.textsecure.storage || {};
2018-05-02 16:51:22 +00:00
window.textsecure.storage.unprocessed = {
2018-07-21 21:51:20 +00:00
getAll() {
2018-05-02 16:51:22 +00:00
return textsecure.storage.protocol.getAllUnprocessed();
},
2018-07-21 21:51:20 +00:00
add(data) {
2018-05-02 16:51:22 +00:00
return textsecure.storage.protocol.addUnprocessed(data);
},
2018-07-21 21:51:20 +00:00
update(id, updates) {
2018-05-02 16:51:22 +00:00
return textsecure.storage.protocol.updateUnprocessed(id, updates);
},
2018-07-21 21:51:20 +00:00
remove(id) {
2018-05-02 16:51:22 +00:00
return textsecure.storage.protocol.removeUnprocessed(id);
},
};
})();