forked from shadowfacts/Tusker
Fix push notifications not working when account ID contains slashes
This commit is contained in:
parent
405d5def7c
commit
a759731eba
|
@ -71,7 +71,7 @@ class PushManagerImpl: _PushManager {
|
||||||
|
|
||||||
private func endpointURL(deviceToken: Data, accountID: String) -> URL {
|
private func endpointURL(deviceToken: Data, accountID: String) -> URL {
|
||||||
var endpoint = URLComponents(url: endpoint, resolvingAgainstBaseURL: false)!
|
var endpoint = URLComponents(url: endpoint, resolvingAgainstBaseURL: false)!
|
||||||
let accountID = accountID.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed)!
|
let accountID = accountID.addingPercentEncoding(withAllowedCharacters: .alphanumerics)!
|
||||||
endpoint.path = "/push/v1/\(apnsEnvironment)/\(deviceToken.hexEncodedString())/\(accountID)"
|
endpoint.path = "/push/v1/\(apnsEnvironment)/\(deviceToken.hexEncodedString())/\(accountID)"
|
||||||
return endpoint.url!
|
return endpoint.url!
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue