Fix push notifications not working when account ID contains slashes

This commit is contained in:
Shadowfacts 2024-04-15 22:19:24 -04:00
parent 405d5def7c
commit a759731eba
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ class PushManagerImpl: _PushManager {
private func endpointURL(deviceToken: Data, accountID: String) -> URL {
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)"
return endpoint.url!
}