Don't consider empty relays present on receipt delivery.
This commit is contained in:
parent
de2f0914f0
commit
6ef3845a34
|
@ -49,8 +49,11 @@ public class ReceiptController {
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (relay.isPresent()) sendRelayedReceipt(source, destination, messageId, relay.get());
|
if (relay.isPresent() && !relay.get().isEmpty()) {
|
||||||
else sendDirectReceipt(source, destination, messageId);
|
sendRelayedReceipt(source, destination, messageId, relay.get());
|
||||||
|
} else {
|
||||||
|
sendDirectReceipt(source, destination, messageId);
|
||||||
|
}
|
||||||
} catch (NoSuchUserException | NotPushRegisteredException e) {
|
} catch (NoSuchUserException | NotPushRegisteredException e) {
|
||||||
throw new WebApplicationException(Response.Status.NOT_FOUND);
|
throw new WebApplicationException(Response.Status.NOT_FOUND);
|
||||||
} catch (TransientPushFailureException e) {
|
} catch (TransientPushFailureException e) {
|
||||||
|
|
Loading…
Reference in New Issue