When the client app subscribes to receive RT events, it would use conditional delivery listeners:
Using the API you can specify a where clause that will narrow down objects received by the client to only those matching the condition (where clause).
Regards,
Mark
But again that is on the client side… not secure.
im using JS with cordova
Use the doc switcher in the upper left corner to switch to the JS doc
i know that mark
im not asking how to filter on the client side. i already done that.
im asking on how to filter on the server side
If I understood correctly, you want to be able to validate RT subscriptions. For instance, if the client app subscribes to receive update/delete events (with or without) a condition, you want to be able to override and possibly reject those requests using cloud code. Please confirm.
Yes exactly
i used to be able to do it with ACL
Got it, I will discuss it with the dev team asap.
Regards,
Mark
For tracking purposes, the internal discussion ID is BKNDLSS-24317
1 Like
ACL will be removed in two weeks.
any solution so my app is not broken?
Hi, @mohammad_altoiher,
First of all, sorry you had to wait so long for an answer. In order to solve your issue, we’ve added some new listeners that will be available after the next release, which we are going to have this week. Once the new functionality has been added, we will let you know about it.
Regards,
Marina
1 Like
Hello @mohammad_altoiher
We have added two new real-time event handlers:
- onAddDataListener;
- onAddDataRelationListener;
You can find them in the Real Time Events category:
https://monosnap.com/direct/AI6yKQ4Cf84U4y0u7pn9M8qGbFV3t8
Let us know if this helped you solve the problem.
Regards,
Inna
Hi
as i test more i found a need that is not fulfilled with this approch
in my app i have a table that track the loggedin users connection status.
if user A have an open chat window with user B then he gets updates for user B connection status.
if user A is not in chat with user B he does not get updated for the connection status for user B
and the users in the app get in and out of chat windows between each other as they wish.
so the permissions changes after the listener is created on the client. and verified by the server with the new events.
so right now if i have 10000 users in my app all of them will get the update if any of them connect or disconnect which will create unneeded stress on the app and server and a security issue as well
You may use conditions for filtering rt messages.
Please, describe in short your final goal now.
My needs are to change the objects that the user can listen to based on the screen he is on.
i used to do this on codeless when the user inter the page
and when he leave the page i do this
Have you tried to use ‘whereClause’ for listeners ?
i don’t trust the client side
and for the new events i cant change specific object access on the fly
Hello @mohammad_altoiher,
we are working on finding a suitable solution for this case.
Regards,
Olha
1 Like