Member registration fixed
Some checks failed
Code Analysis and Production Deploy / analyze (push) Failing after 6m17s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Has been skipped

This commit is contained in:
Torsten Schulz (local)
2026-08-12 11:15:07 +02:00
parent 281c25b05d
commit cb89fdd911
15 changed files with 263 additions and 41 deletions

View File

@@ -114,14 +114,14 @@ async function sendFcmMessage({ serviceAccount, accessToken, token, title, body,
body: JSON.stringify({
message: {
token,
notification: { title, body },
data,
android: {
priority: 'high',
notification: {
channel_id: 'harheimer_tc_updates',
click_action: 'OPEN_NEWS'
}
// Keep this as a data message. With a `notification` payload FCM
// renders background messages itself, bypassing our notification
// channel and HarheimerMessagingService. Data messages use the
// same app-controlled channel while the app is foregrounded and
// backgrounded.
}
}
})
@@ -206,7 +206,11 @@ export async function sendPushToUsers({ title, body, data = {}, predicate, bodyF
}
}
if (changed) await writeUsers(users)
return { sent, failed, removed, recipients, tokenCount, skipped: false }
const result = { sent, failed, removed, recipients, tokenCount, skipped: false }
// This makes an absent registration immediately visible in the production
// log without exposing tokens or user data.
console.info('FCM Push Ergebnis:', { failureLabel, ...result })
return result
}
export async function sendNewNewsPush(news) {