mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-21 00:48:19 +01:00
Move group storage into window.axolotl
This commit is contained in:
26
libtextsecure/axolotl_wrapper.js
Normal file
26
libtextsecure/axolotl_wrapper.js
Normal file
@@ -0,0 +1,26 @@
|
||||
//TODO: Remove almost everything here...
|
||||
|
||||
'use strict';
|
||||
|
||||
;(function() {
|
||||
window.axolotl = window.axolotl || {};
|
||||
window.axolotl.api = {
|
||||
getMyIdentifier: function() {
|
||||
return textsecure.utils.unencodeNumber(textsecure.storage.getUnencrypted("number_id"))[0];
|
||||
},
|
||||
isIdentifierSane: function(identifier) {
|
||||
return textsecure.utils.isNumberSane(identifier);
|
||||
},
|
||||
storage: {
|
||||
put: function(key, value) {
|
||||
return textsecure.storage.putEncrypted(key, value);
|
||||
},
|
||||
get: function(key, defaultValue) {
|
||||
return textsecure.storage.getEncrypted(key, defaultValue);
|
||||
},
|
||||
remove: function(key) {
|
||||
return textsecure.storage.removeEncrypted(key);
|
||||
},
|
||||
},
|
||||
};
|
||||
})();
|
||||
Reference in New Issue
Block a user