Skip to content

Commit

Permalink
Add support for forwarding apns-id (#26)
Browse files Browse the repository at this point in the history
* Add support for forwarding apns-id

The support for apns-id swift-server-community/APNSwift#99

* Update Request+APNS.swift

* Add default value to apnsID

* Add default value for apns-id
  • Loading branch information
mackoj authored Jan 8, 2021
1 parent 77058fd commit 8401962
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Sources/APNS/Application+APNS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ extension Application.APNS: APNSwiftClient {
priority: Int?,
collapseIdentifier: String?,
topic: String?,
logger: Logger?
logger: Logger?,
apnsID: UUID? = nil
) -> EventLoopFuture<Void> {
self.application.apns.pool.withConnection(
logger: logger,
Expand All @@ -82,7 +83,8 @@ extension Application.APNS: APNSwiftClient {
priority: priority,
collapseIdentifier: collapseIdentifier,
topic: topic,
logger: logger
logger: logger,
apnsID: apnsID
)
}
}
Expand Down
6 changes: 4 additions & 2 deletions Sources/APNS/Request+APNS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ extension Request.APNS: APNSwiftClient {
priority: Int?,
collapseIdentifier: String?,
topic: String?,
logger: Logger?
logger: Logger?,
apnsID: UUID? = nil
) -> EventLoopFuture<Void> {
self.request.application.apns.pool.withConnection(
logger: logger,
Expand All @@ -41,7 +42,8 @@ extension Request.APNS: APNSwiftClient {
priority: priority,
collapseIdentifier: collapseIdentifier,
topic: topic,
logger: logger
logger: logger,
apnsID: apnsID
)
}
}
Expand Down

0 comments on commit 8401962

Please sign in to comment.