Skip to content

Commit

Permalink
fix: initialize FCM client once. (#804)
Browse files Browse the repository at this point in the history
  • Loading branch information
hchienjo authored Aug 20, 2024
1 parent 4f10394 commit 4745706
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion notify/notification_fcm.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ func InitFCMClient(ctx context.Context, cfg *config.ConfYaml) (*fcm.Client, erro
return FCMClient, nil
}

return fcm.NewClient(
var err error
FCMClient, err = fcm.NewClient(
ctx,
opts...,
)

return FCMClient, err
}

// GetAndroidNotification use for define Android notification.
Expand Down

0 comments on commit 4745706

Please sign in to comment.