diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/controllers/MessageController.java b/service/src/main/java/org/whispersystems/textsecuregcm/controllers/MessageController.java index 55af5b6c6..eff418bd0 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/controllers/MessageController.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/controllers/MessageController.java @@ -198,10 +198,6 @@ public class MessageController { contentLength += message.getContent().length(); } - if (!Util.isEmpty(message.getBody())) { - contentLength += message.getBody().length(); - } - validateContentLength(contentLength, userAgent); validateEnvelopeType(message.getType(), userAgent); } @@ -529,9 +525,7 @@ public class MessageController { for (final OutgoingMessageEntity message : messageList.getMessages()) { size += message.getContent() == null ? 0 : message.getContent().length; - size += message.getMessage() == null ? 0 : message.getMessage().length; size += Util.isEmpty(message.getSource()) ? 0 : message.getSource().length(); - size += Util.isEmpty(message.getRelay()) ? 0 : message.getRelay().length(); } return size; @@ -582,7 +576,6 @@ public class MessageController { String userAgentString) throws NoSuchUserException { try { - Optional messageBody = getMessageBody(incomingMessage); Optional messageContent = getMessageContent(incomingMessage); Envelope.Builder messageBuilder = Envelope.newBuilder(); @@ -619,11 +612,6 @@ public class MessageController { .setSourceUuid(authenticatedAccount.getAccount().getUuid().toString()) .setSourceDevice((int) authenticatedAccount.getAuthenticatedDevice().getId())); - messageBody.ifPresent(bytes -> { - Metrics.counter(LEGACY_MESSAGE_SENT_COUNTER).increment(); - messageBuilder.setLegacyMessage(ByteString.copyFrom(messageBody.get())); - }); - messageContent.ifPresent(bytes -> messageBuilder.setContent(ByteString.copyFrom(bytes))); messageSender.sendMessage(destinationAccount, destinationDevice, messageBuilder.build(), online); @@ -798,17 +786,6 @@ public class MessageController { } } - private Optional getMessageBody(IncomingMessage message) { - if (Util.isEmpty(message.getBody())) return Optional.empty(); - - try { - return Optional.of(Base64.getDecoder().decode(message.getBody())); - } catch (IllegalArgumentException e) { - logger.debug("Bad B64", e); - return Optional.empty(); - } - } - private Optional getMessageContent(IncomingMessage message) { if (Util.isEmpty(message.getContent())) return Optional.empty(); diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/entities/IncomingMessage.java b/service/src/main/java/org/whispersystems/textsecuregcm/entities/IncomingMessage.java index bd7ea6cfa..ea2ce1a50 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/entities/IncomingMessage.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/entities/IncomingMessage.java @@ -21,15 +21,9 @@ public class IncomingMessage { @JsonProperty private final int destinationRegistrationId; - @JsonProperty - private final String body; - @JsonProperty private final String content; - @JsonProperty - private final String relay; - @JsonProperty private long timestamp; // deprecated @@ -39,34 +33,22 @@ public class IncomingMessage { @JsonProperty("destination") final String destination, @JsonProperty("destinationDeviceId") final long destinationDeviceId, @JsonProperty("destinationRegistrationId") final int destinationRegistrationId, - @JsonProperty("body") final String body, - @JsonProperty("content") final String content, - @JsonProperty("relay") final String relay) { + @JsonProperty("content") final String content) { this.type = type; this.destination = destination; this.destinationDeviceId = destinationDeviceId; this.destinationRegistrationId = destinationRegistrationId; - this.body = body; this.content = content; - this.relay = relay; } public String getDestination() { return destination; } - public String getBody() { - return body; - } - public int getType() { return type; } - public String getRelay() { - return relay; - } - public long getDestinationDeviceId() { return destinationDeviceId; } diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/entities/OutgoingMessageEntity.java b/service/src/main/java/org/whispersystems/textsecuregcm/entities/OutgoingMessageEntity.java index c479fa900..0d8bb6747 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/entities/OutgoingMessageEntity.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/entities/OutgoingMessageEntity.java @@ -15,38 +15,32 @@ public class OutgoingMessageEntity { private final UUID guid; private final int type; - private final String relay; private final long timestamp; private final String source; private final UUID sourceUuid; private final int sourceDevice; private final UUID destinationUuid; - private final byte[] message; private final byte[] content; private final long serverTimestamp; @JsonCreator public OutgoingMessageEntity(@JsonProperty("guid") final UUID guid, @JsonProperty("type") final int type, - @JsonProperty("relay") final String relay, @JsonProperty("timestamp") final long timestamp, @JsonProperty("source") final String source, @JsonProperty("sourceUuid") final UUID sourceUuid, @JsonProperty("sourceDevice") final int sourceDevice, @JsonProperty("destinationUuid") final UUID destinationUuid, - @JsonProperty("message") final byte[] message, @JsonProperty("content") final byte[] content, @JsonProperty("serverTimestamp") final long serverTimestamp) { this.guid = guid; this.type = type; - this.relay = relay; this.timestamp = timestamp; this.source = source; this.sourceUuid = sourceUuid; this.sourceDevice = sourceDevice; this.destinationUuid = destinationUuid; - this.message = message; this.content = content; this.serverTimestamp = serverTimestamp; } @@ -59,10 +53,6 @@ public class OutgoingMessageEntity { return type; } - public String getRelay() { - return relay; - } - public long getTimestamp() { return timestamp; } @@ -83,10 +73,6 @@ public class OutgoingMessageEntity { return destinationUuid; } - public byte[] getMessage() { - return message; - } - public byte[] getContent() { return content; } @@ -105,18 +91,15 @@ public class OutgoingMessageEntity { sourceDevice == that.sourceDevice && serverTimestamp == that.serverTimestamp && guid.equals(that.guid) && - Objects.equals(relay, that.relay) && Objects.equals(source, that.source) && Objects.equals(sourceUuid, that.sourceUuid) && destinationUuid.equals(that.destinationUuid) && - Arrays.equals(message, that.message) && Arrays.equals(content, that.content); } @Override public int hashCode() { - int result = Objects.hash(guid, type, relay, timestamp, source, sourceUuid, sourceDevice, destinationUuid, serverTimestamp); - result = 31 * result + Arrays.hashCode(message); + int result = Objects.hash(guid, type, timestamp, source, sourceUuid, sourceDevice, destinationUuid, serverTimestamp); result = 31 * result + Arrays.hashCode(content); return result; } diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/storage/MessagesCache.java b/service/src/main/java/org/whispersystems/textsecuregcm/storage/MessagesCache.java index a8107b32e..bbe7b564d 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/storage/MessagesCache.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/storage/MessagesCache.java @@ -380,13 +380,11 @@ public class MessagesCache extends RedisClusterPubSubAdapter imp return new OutgoingMessageEntity( envelope.hasServerGuid() ? UUID.fromString(envelope.getServerGuid()) : null, envelope.getType().getNumber(), - envelope.getRelay(), envelope.getTimestamp(), envelope.getSource(), envelope.hasSourceUuid() ? UUID.fromString(envelope.getSourceUuid()) : null, envelope.getSourceDevice(), envelope.hasDestinationUuid() ? UUID.fromString(envelope.getDestinationUuid()) : null, - envelope.hasLegacyMessage() ? envelope.getLegacyMessage().toByteArray() : null, envelope.hasContent() ? envelope.getContent().toByteArray() : null, envelope.hasServerTimestamp() ? envelope.getServerTimestamp() : 0); } diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/storage/MessagesDynamoDb.java b/service/src/main/java/org/whispersystems/textsecuregcm/storage/MessagesDynamoDb.java index 67af5abaa..882a34047 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/storage/MessagesDynamoDb.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/storage/MessagesDynamoDb.java @@ -41,13 +41,11 @@ public class MessagesDynamoDb extends AbstractDynamoDbStore { private static final String LOCAL_INDEX_MESSAGE_UUID_KEY_SORT = "U"; private static final String KEY_TYPE = "T"; - private static final String KEY_RELAY = "R"; private static final String KEY_TIMESTAMP = "TS"; private static final String KEY_SOURCE = "SN"; private static final String KEY_SOURCE_UUID = "SU"; private static final String KEY_SOURCE_DEVICE = "SD"; private static final String KEY_DESTINATION_UUID = "DU"; - private static final String KEY_MESSAGE = "M"; private static final String KEY_CONTENT = "C"; private static final String KEY_TTL = "E"; @@ -90,9 +88,6 @@ public class MessagesDynamoDb extends AbstractDynamoDbStore { item.put(KEY_DESTINATION_UUID, AttributeValues.fromUUID(UUID.fromString(message.getDestinationUuid()))); - if (message.hasRelay() && message.getRelay().length() > 0) { - item.put(KEY_RELAY, AttributeValues.fromString(message.getRelay())); - } if (message.hasSource()) { item.put(KEY_SOURCE, AttributeValues.fromString(message.getSource())); } @@ -102,9 +97,6 @@ public class MessagesDynamoDb extends AbstractDynamoDbStore { if (message.hasSourceDevice()) { item.put(KEY_SOURCE_DEVICE, AttributeValues.fromInt(message.getSourceDevice())); } - if (message.hasLegacyMessage()) { - item.put(KEY_MESSAGE, AttributeValues.fromByteArray(message.getLegacyMessage().toByteArray())); - } if (message.hasContent()) { item.put(KEY_CONTENT, AttributeValues.fromByteArray(message.getContent().toByteArray())); } @@ -223,15 +215,13 @@ public class MessagesDynamoDb extends AbstractDynamoDbStore { final SortKey sortKey = convertSortKey(message.get(KEY_SORT).b().asByteArray()); final UUID messageUuid = convertLocalIndexMessageUuidSortKey(message.get(LOCAL_INDEX_MESSAGE_UUID_KEY_SORT).b().asByteArray()); final int type = AttributeValues.getInt(message, KEY_TYPE, 0); - final String relay = AttributeValues.getString(message, KEY_RELAY, null); final long timestamp = AttributeValues.getLong(message, KEY_TIMESTAMP, 0L); final String source = AttributeValues.getString(message, KEY_SOURCE, null); final UUID sourceUuid = AttributeValues.getUUID(message, KEY_SOURCE_UUID, null); final int sourceDevice = AttributeValues.getInt(message, KEY_SOURCE_DEVICE, 0); final UUID destinationUuid = AttributeValues.getUUID(message, KEY_DESTINATION_UUID, null); - final byte[] messageBytes = AttributeValues.getByteArray(message, KEY_MESSAGE, null); final byte[] content = AttributeValues.getByteArray(message, KEY_CONTENT, null); - return new OutgoingMessageEntity(messageUuid, type, relay, timestamp, source, sourceUuid, sourceDevice, destinationUuid, messageBytes, content, sortKey.getServerTimestamp()); + return new OutgoingMessageEntity(messageUuid, type, timestamp, source, sourceUuid, sourceDevice, destinationUuid, content, sortKey.getServerTimestamp()); } private void deleteRowsMatchingQuery(AttributeValue partitionKey, QueryRequest querySpec) { diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/websocket/WebSocketConnection.java b/service/src/main/java/org/whispersystems/textsecuregcm/websocket/WebSocketConnection.java index 88c76ed2c..9ae915116 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/websocket/WebSocketConnection.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/websocket/WebSocketConnection.java @@ -326,18 +326,10 @@ public class WebSocketConnection implements MessageAvailabilityListener, Displac } } - if (message.getMessage() != null) { - builder.setLegacyMessage(ByteString.copyFrom(message.getMessage())); - } - if (message.getContent() != null) { builder.setContent(ByteString.copyFrom(message.getContent())); } - if (message.getRelay() != null && !message.getRelay().isEmpty()) { - builder.setRelay(message.getRelay()); - } - builder.setDestinationUuid(message.getDestinationUuid().toString()); builder.setServerGuid(message.getGuid().toString()); diff --git a/service/src/main/proto/TextSecure.proto b/service/src/main/proto/TextSecure.proto index d8c80196d..1c03bb0c3 100644 --- a/service/src/main/proto/TextSecure.proto +++ b/service/src/main/proto/TextSecure.proto @@ -35,9 +35,7 @@ message Envelope { optional string source = 2; optional string sourceUuid = 11; optional uint32 sourceDevice = 7; - optional string relay = 3; optional uint64 timestamp = 5; - optional bytes legacyMessage = 6; // Contains an encrypted DataMessage XXX -- Remove after 10/01/15 optional bytes content = 8; // Contains an encrypted Content optional string serverGuid = 9; optional uint64 server_timestamp = 10; diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/controllers/MessageControllerTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/controllers/MessageControllerTest.java index 39364b74f..b89449cea 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/controllers/MessageControllerTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/controllers/MessageControllerTest.java @@ -497,8 +497,8 @@ class MessageControllerTest { final UUID sourceUuid = UUID.randomUUID(); List messages = new LinkedList<>() {{ - add(new OutgoingMessageEntity(messageGuidOne, Envelope.Type.CIPHERTEXT_VALUE, null, timestampOne, "+14152222222", sourceUuid, 2, AuthHelper.VALID_UUID, "hi there".getBytes(), null, 0)); - add(new OutgoingMessageEntity(null, Envelope.Type.SERVER_DELIVERY_RECEIPT_VALUE, null, timestampTwo, "+14152222222", sourceUuid, 2, AuthHelper.VALID_UUID, null, null, 0)); + add(new OutgoingMessageEntity(messageGuidOne, Envelope.Type.CIPHERTEXT_VALUE, timestampOne, "+14152222222", sourceUuid, 2, AuthHelper.VALID_UUID, "hi there".getBytes(), 0)); + add(new OutgoingMessageEntity(null, Envelope.Type.SERVER_DELIVERY_RECEIPT_VALUE, timestampTwo, "+14152222222", sourceUuid, 2, AuthHelper.VALID_UUID, null, 0)); }}; OutgoingMessageEntityList messagesList = new OutgoingMessageEntityList(messages, false); @@ -530,8 +530,8 @@ class MessageControllerTest { final long timestampTwo = 313388; List messages = new LinkedList() {{ - add(new OutgoingMessageEntity(UUID.randomUUID(), Envelope.Type.CIPHERTEXT_VALUE, null, timestampOne, "+14152222222", UUID.randomUUID(), 2, AuthHelper.VALID_UUID, "hi there".getBytes(), null, 0)); - add(new OutgoingMessageEntity(UUID.randomUUID(), Envelope.Type.SERVER_DELIVERY_RECEIPT_VALUE, null, timestampTwo, "+14152222222", UUID.randomUUID(), 2, AuthHelper.VALID_UUID, null, null, 0)); + add(new OutgoingMessageEntity(UUID.randomUUID(), Envelope.Type.CIPHERTEXT_VALUE, timestampOne, "+14152222222", UUID.randomUUID(), 2, AuthHelper.VALID_UUID, "hi there".getBytes(), 0)); + add(new OutgoingMessageEntity(UUID.randomUUID(), Envelope.Type.SERVER_DELIVERY_RECEIPT_VALUE, timestampTwo, "+14152222222", UUID.randomUUID(), 2, AuthHelper.VALID_UUID, null, 0)); }}; OutgoingMessageEntityList messagesList = new OutgoingMessageEntityList(messages, false); @@ -557,12 +557,12 @@ class MessageControllerTest { UUID uuid1 = UUID.randomUUID(); when(messagesManager.delete(AuthHelper.VALID_UUID, 1, uuid1)).thenReturn(Optional.of(new OutgoingMessageEntity( uuid1, Envelope.Type.CIPHERTEXT_VALUE, - null, timestamp, "+14152222222", sourceUuid, 1, AuthHelper.VALID_UUID, "hi".getBytes(), null, 0))); + timestamp, "+14152222222", sourceUuid, 1, AuthHelper.VALID_UUID, "hi".getBytes(), 0))); UUID uuid2 = UUID.randomUUID(); when(messagesManager.delete(AuthHelper.VALID_UUID, 1, uuid2)).thenReturn(Optional.of(new OutgoingMessageEntity( uuid2, Envelope.Type.SERVER_DELIVERY_RECEIPT_VALUE, - null, System.currentTimeMillis(), "+14152222222", sourceUuid, 1, AuthHelper.VALID_UUID, null, null, 0))); + System.currentTimeMillis(), "+14152222222", sourceUuid, 1, AuthHelper.VALID_UUID, null, 0))); UUID uuid3 = UUID.randomUUID(); when(messagesManager.delete(AuthHelper.VALID_UUID, 1, uuid3)).thenReturn(Optional.empty()); @@ -646,7 +646,7 @@ class MessageControllerTest { try { return Stream.of( Entity.entity(new IncomingMessageList( - List.of(new IncomingMessage(1, null, 1L, 1, new String(contentBytes), null, null)), false, + List.of(new IncomingMessage(1, null, 1L, 1, new String(contentBytes))), false, System.currentTimeMillis()), MediaType.APPLICATION_JSON_TYPE), Entity.entity(messageStream.toByteArray(), MultiDeviceMessageListProvider.MEDIA_TYPE) diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/tests/storage/MessagesDynamoDbTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/tests/storage/MessagesDynamoDbTest.java index 7798ff99d..d2596d222 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/tests/storage/MessagesDynamoDbTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/tests/storage/MessagesDynamoDbTest.java @@ -172,10 +172,8 @@ class MessagesDynamoDbTest { assertThat(retrieved.getSource()).isEqualTo(inserted.hasSource() ? inserted.getSource() : null); assertThat(retrieved.getSourceUuid()).isEqualTo(inserted.hasSourceUuid() ? UUID.fromString(inserted.getSourceUuid()) : null); assertThat(retrieved.getSourceDevice()).isEqualTo(inserted.getSourceDevice()); - assertThat(retrieved.getRelay()).isEqualTo(inserted.hasRelay() ? inserted.getRelay() : null); assertThat(retrieved.getType()).isEqualTo(inserted.getType().getNumber()); assertThat(retrieved.getContent()).isEqualTo(inserted.hasContent() ? inserted.getContent().toByteArray() : null); - assertThat(retrieved.getMessage()).isEqualTo(inserted.hasLegacyMessage() ? inserted.getLegacyMessage().toByteArray() : null); assertThat(retrieved.getServerTimestamp()).isEqualTo(inserted.getServerTimestamp()); assertThat(retrieved.getGuid()).isEqualTo(UUID.fromString(inserted.getServerGuid())); assertThat(retrieved.getDestinationUuid()).isEqualTo(UUID.fromString(inserted.getDestinationUuid())); diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/websocket/WebSocketConnectionTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/websocket/WebSocketConnectionTest.java index 5d69aaae6..3594748e1 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/websocket/WebSocketConnectionTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/websocket/WebSocketConnectionTest.java @@ -287,7 +287,6 @@ class WebSocketConnectionTest { final UUID senderTwoUuid = UUID.randomUUID(); final Envelope firstMessage = Envelope.newBuilder() - .setLegacyMessage(ByteString.copyFrom("first".getBytes())) .setSource("sender1") .setSourceUuid(UUID.randomUUID().toString()) .setDestinationUuid(UUID.randomUUID().toString()) @@ -297,7 +296,6 @@ class WebSocketConnectionTest { .build(); final Envelope secondMessage = Envelope.newBuilder() - .setLegacyMessage(ByteString.copyFrom("second".getBytes())) .setSource("sender2") .setSourceUuid(senderTwoUuid.toString()) .setDestinationUuid(UUID.randomUUID().toString()) @@ -307,13 +305,13 @@ class WebSocketConnectionTest { .build(); List pendingMessages = new LinkedList() {{ - add(new OutgoingMessageEntity(UUID.randomUUID(), firstMessage.getType().getNumber(), firstMessage.getRelay(), + add(new OutgoingMessageEntity(UUID.randomUUID(), firstMessage.getType().getNumber(), firstMessage.getTimestamp(), firstMessage.getSource(), UUID.fromString(firstMessage.getSourceUuid()), - firstMessage.getSourceDevice(), UUID.fromString(firstMessage.getDestinationUuid()), firstMessage.getLegacyMessage().toByteArray(), + firstMessage.getSourceDevice(), UUID.fromString(firstMessage.getDestinationUuid()), firstMessage.getContent().toByteArray(), 0)); - add(new OutgoingMessageEntity(UUID.randomUUID(), secondMessage.getType().getNumber(), secondMessage.getRelay(), + add(new OutgoingMessageEntity(UUID.randomUUID(), secondMessage.getType().getNumber(), secondMessage.getTimestamp(), secondMessage.getSource(), UUID.fromString(secondMessage.getSourceUuid()), - secondMessage.getSourceDevice(), UUID.fromString(secondMessage.getDestinationUuid()), secondMessage.getLegacyMessage().toByteArray(), + secondMessage.getSourceDevice(), UUID.fromString(secondMessage.getDestinationUuid()), secondMessage.getContent().toByteArray(), 0)); }}; @@ -897,7 +895,7 @@ class WebSocketConnectionTest { private OutgoingMessageEntity createMessage(String sender, UUID senderUuid, UUID destinationUuid, long timestamp, boolean receipt, String content) { return new OutgoingMessageEntity(UUID.randomUUID(), receipt ? Envelope.Type.SERVER_DELIVERY_RECEIPT_VALUE : Envelope.Type.CIPHERTEXT_VALUE, - null, timestamp, sender, senderUuid, 1, destinationUuid, content.getBytes(), null, 0); + timestamp, sender, senderUuid, 1, destinationUuid, content.getBytes(), 0); } } diff --git a/service/src/test/resources/fixtures/current_message_extra_device.json b/service/src/test/resources/fixtures/current_message_extra_device.json index aed97de3a..cd9b8fcb8 100644 --- a/service/src/test/resources/fixtures/current_message_extra_device.json +++ b/service/src/test/resources/fixtures/current_message_extra_device.json @@ -2,13 +2,13 @@ "messages" : [{ "type" : 1, "destinationDeviceId" : 1, - "body" : "Zm9vYmFyego", + "content" : "Zm9vYmFyego", "timestamp" : 1234 }, { "type" : 1, "destinationDeviceId" : 3, - "body" : "Zm9vYmFyego", + "content" : "Zm9vYmFyego", "timestamp" : 1234 }] -} \ No newline at end of file +} diff --git a/service/src/test/resources/fixtures/current_message_multi_device.json b/service/src/test/resources/fixtures/current_message_multi_device.json index a04c8a3a7..4236372fe 100644 --- a/service/src/test/resources/fixtures/current_message_multi_device.json +++ b/service/src/test/resources/fixtures/current_message_multi_device.json @@ -3,14 +3,14 @@ "type" : 1, "destinationDeviceId" : 1, "destinationRegistrationId" : 222, - "body" : "Zm9vYmFyego", + "content" : "Zm9vYmFyego", "timestamp" : 1234 }, { "type" : 1, "destinationDeviceId" : 2, "destinationRegistrationId" : 333, - "body" : "Zm9vYmFyego", + "content" : "Zm9vYmFyego", "timestamp" : 1234 }] -} \ No newline at end of file +} diff --git a/service/src/test/resources/fixtures/current_message_null_message_in_list.json b/service/src/test/resources/fixtures/current_message_null_message_in_list.json index 501259ca7..11dcf0b5c 100644 --- a/service/src/test/resources/fixtures/current_message_null_message_in_list.json +++ b/service/src/test/resources/fixtures/current_message_null_message_in_list.json @@ -2,7 +2,7 @@ "messages" : [ { "type" : 1, "destinationDeviceId" : 1, - "body" : "Zm9vYmFyego", + "content" : "Zm9vYmFyego", "timestamp" : 1234 }, null ] } diff --git a/service/src/test/resources/fixtures/current_message_registration_id.json b/service/src/test/resources/fixtures/current_message_registration_id.json index f86fcfc47..1b7b03ad5 100644 --- a/service/src/test/resources/fixtures/current_message_registration_id.json +++ b/service/src/test/resources/fixtures/current_message_registration_id.json @@ -3,14 +3,14 @@ "type" : 1, "destinationDeviceId" : 1, "destinationRegistrationId" : 222, - "body" : "Zm9vYmFyego", + "content" : "Zm9vYmFyego", "timestamp" : 1234 }, { "type" : 1, "destinationDeviceId" : 2, "destinationRegistrationId" : 999, - "body" : "Zm9vYmFyego", + "content" : "Zm9vYmFyego", "timestamp" : 1234 }] -} \ No newline at end of file +} diff --git a/service/src/test/resources/fixtures/current_message_single_device.json b/service/src/test/resources/fixtures/current_message_single_device.json index 7425c1c5c..d35253c3a 100644 --- a/service/src/test/resources/fixtures/current_message_single_device.json +++ b/service/src/test/resources/fixtures/current_message_single_device.json @@ -2,7 +2,7 @@ "messages" : [{ "type" : 1, "destinationDeviceId" : 1, - "body" : "Zm9vYmFyego", + "content" : "Zm9vYmFyego", "timestamp" : 1234 }] -} \ No newline at end of file +} diff --git a/service/src/test/resources/fixtures/current_message_single_device_bad_type.json b/service/src/test/resources/fixtures/current_message_single_device_bad_type.json index f508362db..4822afcfb 100644 --- a/service/src/test/resources/fixtures/current_message_single_device_bad_type.json +++ b/service/src/test/resources/fixtures/current_message_single_device_bad_type.json @@ -2,7 +2,7 @@ "messages" : [{ "type" : 7, "destinationDeviceId" : 1, - "body" : "Zm9vYmFyego", + "content" : "Zm9vYmFyego", "timestamp" : 1234 }] } diff --git a/service/src/test/resources/fixtures/current_message_single_device_server_receipt_type.json b/service/src/test/resources/fixtures/current_message_single_device_server_receipt_type.json index 9496a8ca2..34646ef4d 100644 --- a/service/src/test/resources/fixtures/current_message_single_device_server_receipt_type.json +++ b/service/src/test/resources/fixtures/current_message_single_device_server_receipt_type.json @@ -3,7 +3,7 @@ { "type": 5, "destinationDeviceId": 1, - "body": "Zm9vYmFyego", + "content": "Zm9vYmFyego", "timestamp": 1234 } ] diff --git a/service/src/test/resources/fixtures/legacy_message_single_device.json b/service/src/test/resources/fixtures/legacy_message_single_device.json deleted file mode 100644 index 3480af2e8..000000000 --- a/service/src/test/resources/fixtures/legacy_message_single_device.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "messages" : [{ - "type": 1, - "destination": "+14151111111", - "body": "Zm9vYmFyego", - "timestamp": "1234" - }] -} \ No newline at end of file