Don't send push request if no device id
This commit is contained in:
parent
03e8e493d7
commit
7c2e6bd53e
|
@ -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');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue