From 84019620a5643437ac11dfa5cd017a6208ffb91a Mon Sep 17 00:00:00 2001 From: Jeffrey Macko Date: Fri, 8 Jan 2021 22:07:23 +0100 Subject: [PATCH] Add support for forwarding apns-id (#26) * Add support for forwarding apns-id The support for apns-id https://github.com/kylebrowning/APNSwift/pull/99 * Update Request+APNS.swift * Add default value to apnsID * Add default value for apns-id --- Sources/APNS/Application+APNS.swift | 6 ++++-- Sources/APNS/Request+APNS.swift | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Sources/APNS/Application+APNS.swift b/Sources/APNS/Application+APNS.swift index 14737af..4f7184b 100644 --- a/Sources/APNS/Application+APNS.swift +++ b/Sources/APNS/Application+APNS.swift @@ -68,7 +68,8 @@ extension Application.APNS: APNSwiftClient { priority: Int?, collapseIdentifier: String?, topic: String?, - logger: Logger? + logger: Logger?, + apnsID: UUID? = nil ) -> EventLoopFuture { self.application.apns.pool.withConnection( logger: logger, @@ -82,7 +83,8 @@ extension Application.APNS: APNSwiftClient { priority: priority, collapseIdentifier: collapseIdentifier, topic: topic, - logger: logger + logger: logger, + apnsID: apnsID ) } } diff --git a/Sources/APNS/Request+APNS.swift b/Sources/APNS/Request+APNS.swift index 7117f41..19781dd 100644 --- a/Sources/APNS/Request+APNS.swift +++ b/Sources/APNS/Request+APNS.swift @@ -27,7 +27,8 @@ extension Request.APNS: APNSwiftClient { priority: Int?, collapseIdentifier: String?, topic: String?, - logger: Logger? + logger: Logger?, + apnsID: UUID? = nil ) -> EventLoopFuture { self.request.application.apns.pool.withConnection( logger: logger, @@ -41,7 +42,8 @@ extension Request.APNS: APNSwiftClient { priority: priority, collapseIdentifier: collapseIdentifier, topic: topic, - logger: logger + logger: logger, + apnsID: apnsID ) } }