I didn't bother setting up proper push notification so we use the "Servers supporting chathistory" mode. This means that when the app is not in the foreground a workmanager task polls every few minutes. So in this mode notifications can be delayed by a few minutes which is fine for our use case.