Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications: Check if current device is correctly registered with backend and firebase #2812

Open
sleidig opened this issue Jan 26, 2025 · 0 comments · May be fixed by #2814
Open

Notifications: Check if current device is correctly registered with backend and firebase #2812

sleidig opened this issue Jan 26, 2025 · 0 comments · May be fixed by #2814
Assignees
Milestone

Comments

@sleidig
Copy link
Member

sleidig commented Jan 26, 2025

Implement a method to NotificationService that checks if the current device is correctly registered for PushNotification with all required servers (firebase, aam-backend):

async checkDeviceRegistered(): Promise<boolean>

We need this to reliably display the push notification state/toggle to users and help them re-register the device if necessary.


Before implementing the actual code, add unit tests for the following scenarios (by mocking different http/Notification.permission responses):

  • browser push permission not granted --> expect false
  • aam-backend does not have device registered --> expect false
  • firebase does not have device registered --> expect false
  • all of the above are correct --> expect true
@github-project-automation github-project-automation bot moved this to Triage / Analysis in All Tasks & Issues Jan 26, 2025
@sleidig sleidig added this to the Notifications milestone Jan 26, 2025
@sleidig sleidig moved this from Triage / Analysis to Planned (current "sprint") in All Tasks & Issues Jan 26, 2025
@Ayush8923 Ayush8923 moved this from Planned (current "sprint") to In Progress in All Tasks & Issues Jan 27, 2025
@Ayush8923 Ayush8923 linked a pull request Jan 27, 2025 that will close this issue
1 task
@Ayush8923 Ayush8923 linked a pull request Jan 27, 2025 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants