javascript - Unable to set Parse installation to two channels for push notification -


i'm trying have part of parse cloud code set installation channel push notification purposes. want set installation 2 channels so:

var installationquery = new parse.query(parse.installation); installationquery.equalto('userid', user);  installationquery.first().then(function(result) {    result.set('channels', [user, "highpush"]);    result.save(); }); 

what i'm doing here finding installation associated particular userid, setting installation object's 'channels' property both username ( user variable) string, , string "highpush".

the problem running code seems set "highpush", not both. when try using explicit user string below, sets both, not when use user variable contains same userid string. causing this?

result.set('channels', ["eg7mf6mdkt", "highpush"]); 

logging user variable below succesfully prints, know exists.

console.log('set high push, , userid is' + user); 

i'm skeptical user string here. sure user isn't parse.user?

if indeed parse.user object, @ objectid with:

result.set('channels', [user.id, "highpush"]); 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -