diff --git a/clientapp/models/me.js b/clientapp/models/me.js index 7aa59b9..7e5f24d 100644 --- a/clientapp/models/me.js +++ b/clientapp/models/me.js @@ -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'); + }); + } } }); diff --git a/package.json b/package.json index 8c01598..5a0c5f2 100644 --- a/package.json +++ b/package.json @@ -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",