Move group storage to axolotl store

Add async get/put/removeGroup to axolotl store and let libtextsecure
use it for group state storage.
This commit is contained in:
lilia 2015-05-06 14:22:18 -07:00
parent 748f32022a
commit 359b4a15a2
4 changed files with 114 additions and 72 deletions

View file

@ -279,7 +279,15 @@
resolve(textsecure.storage.axolotl.removeAllSessions(number));
});
},
getGroup: function(groupId) {
return Promise.resolve(textsecure.storage.get("group" + groupId));
},
putGroup: function(groupId, group) {
return Promise.resolve(textsecure.storage.put("group" + groupId, group));
},
removeGroup: function(groupId) {
return Promise.resolve(textsecure.storage.remove("group" + groupId));
},
};