mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-28 13:48:12 +00:00
Improve UD handling for fallback REST sends.
Special thanks to @stevie553 for the wonderfully-detailed bug report! Fixes #11991
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user