fix: APNS token ids are lowercase ASCII (#46101)

This commit is contained in:
Shelley Vohr 2025-03-20 07:57:50 +01:00 committed by GitHub
parent 09a3bcf0f0
commit 86cc9f626f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 9 deletions

View file

@ -180,8 +180,10 @@ static NSDictionary* UNNotificationResponseToNSDictionary(
didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken {
// Resolve outstanding APNS promises created during registration attempts
if (auto* push_notifications = electron::api::PushNotifications::Get()) {
std::string encoded =
base::HexEncode(electron::util::as_byte_span(deviceToken));
push_notifications->ResolveAPNSPromiseSetWithToken(
base::HexEncode(electron::util::as_byte_span(deviceToken)));
base::ToLowerASCII(encoded));
}
}