File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { getIconPath } from "./helper"
1212import { t } from "./lib/i18n"
1313import { store } from "./lib/store"
1414import { updateNotificationsToken } from "./lib/user"
15+ import { logger } from "./logger"
1516import { registerAppMenu } from "./menu"
1617import type { RendererHandlers } from "./renderer-handlers"
1718import { initializeSentry } from "./sentry"
@@ -154,12 +155,15 @@ const registerPushNotifications = async () => {
154155 persistentIds : persistentIds || [ ] ,
155156 credentials,
156157 } )
158+ logger . info ( `PushReceiver initialized with token ${ credentials ?. fcm ?. token } ` )
157159
158160 instance . onCredentialsChanged ( ( { newCredentials } ) => {
161+ logger . info ( `PushReceiver credentials changed to ${ newCredentials ?. fcm ?. token } ` )
159162 updateNotificationsToken ( newCredentials )
160163 } )
161164
162165 instance . onNotification ( ( notification ) => {
166+ logger . info ( `PushReceiver received notification: ${ JSON . stringify ( notification . message . data ) } ` )
163167 const data = notification . message . data as MessagingData
164168 switch ( data . type ) {
165169 case "new-entry" : {
You can’t perform that action at this time.
0 commit comments