signal-desktop/libtextsecure/storage/unprocessed.js

29 lines
822 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();
},
get(id) {
return textsecure.storage.protocol.getUnprocessedById(id);
},
2018-07-21 21:51:20 +00:00
add(data) {
2018-05-02 16:51:22 +00:00
return textsecure.storage.protocol.addUnprocessed(data);
},
save(data) {
return textsecure.storage.protocol.saveUnprocessed(data);
2018-05-02 16:51:22 +00:00
},
2018-07-21 21:51:20 +00:00
remove(id) {
2018-05-02 16:51:22 +00:00
return textsecure.storage.protocol.removeUnprocessed(id);
},
};
})();