Don't send push request if no device id

This commit is contained in:
Lance Stout 2014-01-27 14:28:27 -08:00
parent 03e8e493d7
commit 7c2e6bd53e
2 changed files with 8 additions and 6 deletions

View File

@ -199,10 +199,12 @@ module.exports = HumanModel.define({
},
registerDevice: function () {
var deviceID = app.state.deviceID;
client.otalkRegister(deviceID).then(function () {
client.registerPush('push@push.otalk.im/prod');
}).catch(function (err) {
console.log('Could not enable push notifications');
});
if (!!deviceID) {
client.otalkRegister(deviceID).then(function () {
client.registerPush('push@push.otalk.im/prod');
}).catch(function (err) {
console.log('Could not enable push notifications');
});
}
}
});

View File

@ -1,6 +1,6 @@
{
"name": "otalk.im",
"version": "0.0.17",
"version": "0.0.18",
"description": "Otalk: WebRTC Enabled XMPP Client, in the Browser",
"repository": {
"type": "git",