Use initial state
With https://github.com/nextcloud/server/pull/13646 merged. We can now use an initial state as well for the notifations.
I would suggest to register a callback that will tell the endpoint if there are pending notifications. This saves a request to the server in the 99% case when there are no notifications. Which would require to setup the whole nextcloud env.
Of course the biggsest benefit is that the request often doen't need to happen and the browser can continue loading other assets instead of waiting for the notifiation to return.
Still something for 16 or more something for 17?
17, if the boost is soo high, we can backport it.
https://nextcloud.github.io/nextcloud-initial-state/modules/index.html FYI