mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 11:38:06 +01:00
Assume all accounts have primary devices
This commit is contained in:
committed by
Jon Chambers
parent
69990c23a5
commit
00e72a30c9
@@ -62,7 +62,7 @@ public class PushNotificationManager {
|
||||
public void sendRateLimitChallengeNotification(final Account destination, final String challengeToken)
|
||||
throws NotPushRegisteredException {
|
||||
|
||||
final Device device = destination.getDevice(Device.PRIMARY_ID).orElseThrow(NotPushRegisteredException::new);
|
||||
final Device device = destination.getPrimaryDevice();
|
||||
final Pair<String, PushNotification.TokenType> tokenAndType = getToken(device);
|
||||
|
||||
sendNotification(new PushNotification(tokenAndType.first(), tokenAndType.second(),
|
||||
|
||||
Reference in New Issue
Block a user