kopia lustrzana https://github.com/ryukoposting/Signal-Android
Improve UD handling for fallback REST sends.
Special thanks to @stevie553 for the wonderfully-detailed bug report! Fixes #11991fork-5.53.8
rodzic
e2aec496c5
commit
267897b133
|
@ -515,10 +515,12 @@ public class PushServiceSocket {
|
|||
throws IOException
|
||||
{
|
||||
try {
|
||||
String responseText = makeServiceRequest(String.format(MESSAGE_PATH, bundle.getDestination()), "PUT", JsonUtil.toJson(bundle), NO_HEADERS, unidentifiedAccess);
|
||||
String responseText = makeServiceRequest(String.format(MESSAGE_PATH, bundle.getDestination()), "PUT", JsonUtil.toJson(bundle), NO_HEADERS, unidentifiedAccess);
|
||||
SendMessageResponse response = JsonUtil.fromJson(responseText, SendMessageResponse.class);
|
||||
|
||||
if (responseText == null) return new SendMessageResponse(false, unidentifiedAccess.isPresent());
|
||||
else return JsonUtil.fromJson(responseText, SendMessageResponse.class);
|
||||
response.setSentUnidentfied(unidentifiedAccess.isPresent());
|
||||
|
||||
return response;
|
||||
} catch (NotFoundException nfe) {
|
||||
throw new UnregisteredUserException(bundle.getDestination(), nfe);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue