Member registration fixed
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user