diff --git a/src/main/java/org/whispersystems/textsecuregcm/controllers/MessageController.java b/src/main/java/org/whispersystems/textsecuregcm/controllers/MessageController.java index bfb3f156f..9b6db2f4b 100644 --- a/src/main/java/org/whispersystems/textsecuregcm/controllers/MessageController.java +++ b/src/main/java/org/whispersystems/textsecuregcm/controllers/MessageController.java @@ -235,7 +235,9 @@ public class MessageController { String destination = null; for (IncomingMessage message : messages) { - if (destination != null && !destination.equals(message.getDestination())) { + if ((message.getDestination() == null) || + (destination != null && !destination.equals(message.getDestination()))) + { throw new ValidationException("Multiple account destinations!"); } diff --git a/src/main/java/org/whispersystems/textsecuregcm/entities/IncomingMessage.java b/src/main/java/org/whispersystems/textsecuregcm/entities/IncomingMessage.java index 5af4e79f3..06bee1635 100644 --- a/src/main/java/org/whispersystems/textsecuregcm/entities/IncomingMessage.java +++ b/src/main/java/org/whispersystems/textsecuregcm/entities/IncomingMessage.java @@ -25,7 +25,6 @@ public class IncomingMessage { private int type; @JsonProperty - @NotEmpty private String destination; @JsonProperty