Drop the legacy message and relay fields from message entities
This commit is contained in:
parent
06a57ef811
commit
53f17c2baa
|
@ -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<byte[]> messageBody = getMessageBody(incomingMessage);
|
||||
Optional<byte[]> 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<byte[]> 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<byte[]> getMessageContent(IncomingMessage message) {
|
||||
if (Util.isEmpty(message.getContent())) return Optional.empty();
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -380,13 +380,11 @@ public class MessagesCache extends RedisClusterPubSubAdapter<String, String> 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);
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -497,8 +497,8 @@ class MessageControllerTest {
|
|||
final UUID sourceUuid = UUID.randomUUID();
|
||||
|
||||
List<OutgoingMessageEntity> 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<OutgoingMessageEntity> messages = new LinkedList<OutgoingMessageEntity>() {{
|
||||
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)
|
||||
|
|
|
@ -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()));
|
||||
|
|
|
@ -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<OutgoingMessageEntity> pendingMessages = new LinkedList<OutgoingMessageEntity>() {{
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"messages" : [ {
|
||||
"type" : 1,
|
||||
"destinationDeviceId" : 1,
|
||||
"body" : "Zm9vYmFyego",
|
||||
"content" : "Zm9vYmFyego",
|
||||
"timestamp" : 1234
|
||||
}, null ]
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"messages" : [{
|
||||
"type" : 1,
|
||||
"destinationDeviceId" : 1,
|
||||
"body" : "Zm9vYmFyego",
|
||||
"content" : "Zm9vYmFyego",
|
||||
"timestamp" : 1234
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"messages" : [{
|
||||
"type" : 7,
|
||||
"destinationDeviceId" : 1,
|
||||
"body" : "Zm9vYmFyego",
|
||||
"content" : "Zm9vYmFyego",
|
||||
"timestamp" : 1234
|
||||
}]
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{
|
||||
"type": 5,
|
||||
"destinationDeviceId": 1,
|
||||
"body": "Zm9vYmFyego",
|
||||
"content": "Zm9vYmFyego",
|
||||
"timestamp": 1234
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"messages" : [{
|
||||
"type": 1,
|
||||
"destination": "+14151111111",
|
||||
"body": "Zm9vYmFyego",
|
||||
"timestamp": "1234"
|
||||
}]
|
||||
}
|
Loading…
Reference in New Issue