ParseSwift removed/doesnt include the ability to push notifications via the client, so I am diving head first into cloud code and came up with something like this:
Parse.Cloud.afterSave('Message', (request) => {
const query = new Parse.Query(Parse.Installation);
query.equalTo('deviceToken','2f9e05cc78c72dd6fde814f681d31df7e0d50182742368a42ca7fe99522e382c');
return Parse.Push.send({
where: query,
data: {
title: "Hello from the Cloud Code",
alert: "This is where the message will go ",
}
}, { useMasterKey: true });
});
However I have no idea how to pull information of the just saved message, so that way I can ideally fill in the deviceToken, title, alert, etc. My lack of JS knowledge is severely hindering me in this regard. Any help would be greatly appreciated.