It appears that firebase.messaging().requestPermissions() does not throw error when notification permission are not granted on Android. Using firebase.messaging().hasPermissions() is enough to detect if user did not grant permissions to the app is enough.
Details
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Adding @ashoat because he had somme comments in https://linear.app/comm/issue/ENG-944/android-notif-permissions-arent-re-requested-when-user-disables-them
Awesome, great catch and thanks for fixing it. One note on how we can improve the process.
From ENG-944:
I haven't seen the diff yet, but would be good to include the above information in the "Test Plan" section so it's clear to your reviewers.
Ideally this discussion doesn't need to happen on the task, or on the diff – you would just submit the diff and include all of the relevant info (including the link to the relevant Android code, docs, etc. – all of it) on the diff. Sometimes discussion will be necessary beforehand, but even in those scenarios all of the relevant info should always be included in the diff.