【发布时间】:2016-01-14 17:24:19
【问题描述】:
我的应用有基于邮政编码和频道的通知。
当用户更改邮政编码时,应用会使用新的邮政编码更新Installation。
在我的beforeSaveInstallation 中,我抓取了新的 zip 和订阅频道并搜索相关通知。
然后我需要将通知作为推送发送回该安装。
两个问题:
-
我可以直接推送到
beforeSave中的 Installation 对象吗:return Parse.Push.send({ where: request.object data: data })
还是我必须对该 objectId 进行安装查询?
- 我不能只推送通知对象。我需要配置数据。如果有多个通知(不太可能但可能),将多个推送发送回该安装的最佳方式是什么(假设我不想将它们全部放在一个推送中)?
我无法从for 循环发送推送。我可以这样做吗:
return notificationQuery.each().then( function(notification) {
//configure push from that notification
return Parse.Push.send ... etc
})
谢谢!
【问题讨论】:
标签: parse-platform push-notification parse-cloud-code before-save