Open farconada opened 8 years ago
I was struggling with this one as well. For future readers and maybe @farconada the problem is that client/client.js where setMetaData is defined requires that the token is set before you call Push.setMetaData. Otherwise the metaData is only kept in localstorage.
The obvious chose for me was to just add my setMetaData code into the
Push.addListener('token', function(token) {
console.log('########### Hello from token listener:' + JSON.stringify(token));
Push.setMetaData({tada:'todo'});
});
Thank you for this piece of code. As simple as it can look, it helped me a lot!
Hi I'm trying to attach some metadata to my tokens but not sure if it's my fault or a bug I want to filter messages by channels and channels could be changed by the app user In my code
log
In mongo