Trying to push with coronium.io

15 views
Skip to first unread message

Brian Burton

unread,
Jan 27, 2016, 10:49:21 AM1/27/16
to Coronium IO
Chris,
I have been trying to workout how to use the user.push in coronium.io and haven't been 100% successful yet. I'm hoping you can advise:
I would like to send a push notification to another user based upon their email address. 

I have successfully used mc:linkUserDevice on the client; the device token & OS are registered in _user/user

So, if all I have is a user's email, what would be the best approach to send a push to another device?  

I tried using mc:getUsers({email=pushPerson}) in the client to find the User Id but that returns:
error: find one failed: user

I had planned to pass the UserId to a file on my coronium server and use the coronium.user.push to send the push notification to the correct device.


btw, I am using 1.92.3 for my client mod_coronium and I updated coronium on the server last week.  Devices are showing as registered on PushBots.

Thank you for any direction/advice that you can give!
Bria


develephant

unread,
Jan 27, 2016, 8:06:32 PM1/27/16
to Coronium IO
Hi Dr. B,

You are correct in the use of cloud code. You will also need to query, and push to the user in cloud code as well.

Take a look at:


Let me know if that helps.

Cheers.
Reply all
Reply to author
Forward
0 new messages