Füge Unterstützung für QTTR-Listenaktualisierungen hinzu: Implementiere Push-Benachrichtigung für aktualisierte QTTR-Listen und verbessere die Importlogik.
This commit is contained in:
@@ -334,6 +334,19 @@ export async function sendOwnTtrChangePush(changes = []) {
|
||||
})
|
||||
}
|
||||
|
||||
export async function sendQttrListUpdatedPush({ importedAt, rowCount }) {
|
||||
return sendPushToUsers({
|
||||
title: 'QTTR-Liste aktualisiert',
|
||||
body: `Die aktuelle TTR- und QTTR-Liste wurde aktualisiert (${rowCount} Einträge).`,
|
||||
data: {
|
||||
type: 'qttr_list_updated',
|
||||
importedAt: importedAt || '',
|
||||
notificationId: notificationIdFor(`qttr-list:${importedAt || Date.now()}`)
|
||||
},
|
||||
failureLabel: 'FCM QTTR-Listen-Push'
|
||||
})
|
||||
}
|
||||
|
||||
export async function sendTestPushToUser(userId) {
|
||||
return sendPushToUsers({
|
||||
title: 'Harheimer TC: Push-Test',
|
||||
|
||||
Reference in New Issue
Block a user