The easiest way is to ping on regular intervals or in a significant event of the web app (when the user logs in, for example, or navigates to a view) and read the content type in Backend Services with a filter for new messages for this user.
At the current stage, the backend cannot notify remotely a web app that something interesting happened on the server. We have a feature request with the same subject here
where you can share your ideas or considerations. We also have further ideas in mind for similar features and your feedback is important for us. Thanks in advance.
- In the afterCreate
event of the cloud code, when a new message is added, contact the external service with an HTTP request that it has to accept a new event and to notify the subscribers
I hope that this answers your question.