diff --git a/platform/apns/service.go b/platform/apns/service.go index 51347913..c84ac989 100644 --- a/platform/apns/service.go +++ b/platform/apns/service.go @@ -56,6 +56,12 @@ func New(db Store, provider PushCertificateProvider, sub pubsub.Subscriber, opts for _, opt := range opts { opt(&pushSvc) } + + pushsvc, _ := NewPushService(provider) + if pushsvc != nil { + pushSvc.pushsvc = pushsvc + } + // if there is no push service, the push certificate hasn't been provided. // start a goroutine that delays the run of this service. if err := updateClient(&pushSvc, sub); err != nil {