This commit is contained in:
Niels Andriesse 2020-03-05 16:22:45 +11:00
parent 8c6b60aa08
commit a272677fba
2 changed files with 2 additions and 12 deletions

View File

@ -304,12 +304,7 @@ public class PushMediaSendJob extends PushSendJob implements InjectableType {
} }
SendMessageResult result = messageSender.sendMessage(messageId, address, UnidentifiedAccessUtil.getAccessFor(context, recipient), mediaMessage, Optional.fromNullable(syncMessage)); SendMessageResult result = messageSender.sendMessage(messageId, address, UnidentifiedAccessUtil.getAccessFor(context, recipient), mediaMessage, Optional.fromNullable(syncMessage));
if (result.getLokiAPIError() != null) { if (result.getLokiAPIError() != null) {
Throwable lokiAPIError = result.getLokiAPIError(); throw result.getLokiAPIError();
if (lokiAPIError instanceof LokiAPI.Error) { // Should always be true
throw (LokiAPI.Error) lokiAPIError;
} else {
return result.getSuccess().isUnidentified();
}
} else { } else {
return result.getSuccess().isUnidentified(); return result.getSuccess().isUnidentified();
} }

View File

@ -253,12 +253,7 @@ public class PushTextSendJob extends PushSendJob implements InjectableType {
} }
SendMessageResult result = messageSender.sendMessage(messageId, address, unidentifiedAccess, textSecureMessage, Optional.fromNullable(syncMessage)); SendMessageResult result = messageSender.sendMessage(messageId, address, unidentifiedAccess, textSecureMessage, Optional.fromNullable(syncMessage));
if (result.getLokiAPIError() != null) { if (result.getLokiAPIError() != null) {
Throwable lokiAPIError = result.getLokiAPIError(); throw result.getLokiAPIError();
if (lokiAPIError instanceof LokiAPI.Error) { // Should always be true
throw (LokiAPI.Error) lokiAPIError;
} else {
return result.getSuccess().isUnidentified();
}
} else { } else {
return result.getSuccess().isUnidentified(); return result.getSuccess().isUnidentified();
} }