Hi,
In my database I have a parking session document that looks like this:
{
"latitude": 50.856134,
"licensePlate": "TSA-214",
"longitude": 4.356331,
"plannedEndDate": "2014-08-16T18:00:34.000Z",
"registeredDevices": [
"I7zyZjpICMYSNK6huVgTBulMsicI8++mv2kk8K5c7BA="
],
"startDate": "2014-08-15T16:40:23.329Z",
"type": "parkingSession"
}
Where registeredDevices contains a like of APNS device tokens to which I
want to send push notifications when certain changes happen to this
document.
For example, when an endDate field is added to this document, it means the
parking session is over and I need to notify all the devices that
registered to this document.
How can I do that when I track the changes feed on the sync gateway using
something like Ektorp for example? Is there a proper way to get the
previous revision of a document so that I can compare it with the current
one and see that an endDate field has been added?
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/270f9bea-a37d-44a6-b9d0-31c99ac5e764%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.