kopia lustrzana https://github.com/ryukoposting/Signal-Android
Do not specify random provider.
rodzic
06757153b3
commit
711d22a0ed
|
@ -129,7 +129,7 @@ public class SignalServiceMessagePipe {
|
|||
}
|
||||
|
||||
WebSocketRequestMessage requestMessage = WebSocketRequestMessage.newBuilder()
|
||||
.setId(SecureRandom.getInstance("SHA1PRNG").nextLong())
|
||||
.setId(new SecureRandom().nextLong())
|
||||
.setVerb("PUT")
|
||||
.setPath(String.format("/v1/messages/%s", list.getDestination()))
|
||||
.addAllHeaders(headers)
|
||||
|
@ -144,8 +144,6 @@ public class SignalServiceMessagePipe {
|
|||
|
||||
if (Util.isEmpty(response.second())) return new SendMessageResponse(false);
|
||||
else return JsonUtil.fromJson(response.second(), SendMessageResponse.class);
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
throw new AssertionError(e);
|
||||
} catch (InterruptedException | ExecutionException | TimeoutException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
|
@ -160,7 +158,7 @@ public class SignalServiceMessagePipe {
|
|||
}
|
||||
|
||||
WebSocketRequestMessage requestMessage = WebSocketRequestMessage.newBuilder()
|
||||
.setId(SecureRandom.getInstance("SHA1PRNG").nextLong())
|
||||
.setId(new SecureRandom().nextLong())
|
||||
.setVerb("GET")
|
||||
.setPath(String.format("/v1/profile/%s", address.getIdentifier()))
|
||||
.addAllHeaders(headers)
|
||||
|
@ -173,8 +171,6 @@ public class SignalServiceMessagePipe {
|
|||
}
|
||||
|
||||
return JsonUtil.fromJson(response.second(), SignalServiceProfile.class);
|
||||
} catch (NoSuchAlgorithmException nsae) {
|
||||
throw new AssertionError(nsae);
|
||||
} catch (InterruptedException | ExecutionException | TimeoutException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue