Create a textsecure.storage.impl to be overriden if desired
This commit is contained in:
parent
56bffdcfd3
commit
89fefe4323
2 changed files with 28 additions and 2 deletions
|
@ -37960,7 +37960,8 @@ window.axolotl.sessions = {
|
|||
window.textsecure = window.textsecure || {};
|
||||
window.textsecure.storage = window.textsecure.storage || {};
|
||||
|
||||
window.textsecure.storage = {
|
||||
// Overrideable storage implementation
|
||||
window.textsecure.storage.impl = {
|
||||
/*****************************
|
||||
*** Base Storage Routines ***
|
||||
*****************************/
|
||||
|
@ -37981,6 +37982,18 @@ window.axolotl.sessions = {
|
|||
localStorage.removeItem("" + key);
|
||||
},
|
||||
};
|
||||
|
||||
window.textsecure.storage.put = function(key, value) {
|
||||
return textsecure.storage.impl.put(key, value);
|
||||
};
|
||||
|
||||
window.textsecure.storage.get = function(key, defaultValue) {
|
||||
return textsecure.storage.impl.get(key, defaultValue);
|
||||
};
|
||||
|
||||
window.textsecure.storage.remove = function(key) {
|
||||
return textsecure.storage.impl.remove(key);
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue