adding copayersid and walletid to user subscribe json

This commit is contained in:
Gabriel Bazán 2015-12-28 12:32:01 -03:00
commit 012fb8021b
4 changed files with 9 additions and 5 deletions

View file

@ -28,9 +28,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
}
push.on('registration', function(data) {
var fc = profileService.focusedClient;
var opts = {};
var deviceType = (navigator.userAgent.match(/iPhone/i)) == "iPhone" ? "ios" : (navigator.userAgent.match(/Android/i)) == "Android" ? "android" : null;
opts.user = "copayUser";
opts.user = fc.credentials.copayerId + "||" + fc.credentials.walletId;
opts.type = deviceType;
opts.token = data.registrationId;
storageService.setNotificationsOptions(JSON.stringify(opts), function() {