Namespace registration helpers

This commit is contained in:
lilia 2014-11-13 15:38:09 -08:00
parent 28290477f4
commit 5a0e199fc5
3 changed files with 23 additions and 20 deletions

View file

@ -22,7 +22,7 @@
localStorage.setItem('first_install_ran', 1);
extension.navigator.tabs.create("options.html");
} else {
if (isRegistrationDone()) {
if (textsecure.registration.isDone()) {
textsecure.subscribeToPush(function(message) {
Whisper.Messages.addIncomingMessage(message).then(function() {
console.log("Got message from " + message.pushMessage.source + "." + message.pushMessage.sourceDevice +
@ -36,6 +36,6 @@
}
};
addRegistrationListener(init);
textsecure.registration.addListener(init);
init();
})();