enhance: Implement the toggle to (or not to) close push notifications when notifications or messages are read (#9219)

* create file

* wip

* fix

* wip

* tabun dekita

* ✌️

* implement subscribe push notification button to tutorial

* check-exists→show-registration

* add column sendReadMessage

* fix migration file

* sw api

* change PushNotificationService

* wip

* ✌️

* fix tutorial footer flex
This commit is contained in:
tamaina 2022-12-18 01:59:59 +09:00 committed by GitHub
parent 96dda253b0
commit 4ecc42744c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 483 additions and 106 deletions

View file

@ -69,6 +69,14 @@ export class PushNotificationService {
});
for (const subscription of subscriptions) {
// Continue if sendReadMessage is false
if ([
'readNotifications',
'readAllNotifications',
'readAllMessagingMessages',
'readAllMessagingMessagesOfARoom',
].includes(type) && !subscription.sendReadMessage) continue;
const pushSubscription = {
endpoint: subscription.endpoint,
keys: {