From addebf32348319af4276c677dc661b4edca36747 Mon Sep 17 00:00:00 2001 From: evgeny Date: Wed, 27 Nov 2024 10:27:02 +0000 Subject: [PATCH] [ECO-5139] chore: remove `version` field for now Version is not needed for Chat SDK for now --- .../main/java/io/ably/lib/types/Message.java | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/lib/src/main/java/io/ably/lib/types/Message.java b/lib/src/main/java/io/ably/lib/types/Message.java index d6a096b83..c49599492 100644 --- a/lib/src/main/java/io/ably/lib/types/Message.java +++ b/lib/src/main/java/io/ably/lib/types/Message.java @@ -53,15 +53,6 @@ public class Message extends BaseMessage { */ public String serial; - /** - * (TM2p) version string – an opaque string that uniquely identifies the message, and is different for different versions. - * If a message received from Ably over a realtime transport does not contain a version, - * the SDK must set it to : from the channelSerial field of the enclosing ProtocolMessage, - * and padded_index is the index of the message inside the messages array of the ProtocolMessage, - * left-padded with 0s to three digits (for example, the second entry might be foo:001) - */ - public String version; - /** * (TM2j) action enum */ @@ -71,7 +62,6 @@ public class Message extends BaseMessage { private static final String EXTRAS = "extras"; private static final String CONNECTION_KEY = "connectionKey"; private static final String SERIAL = "serial"; - private static final String VERSION = "version"; private static final String ACTION = "action"; /** @@ -168,10 +158,6 @@ void writeMsgpack(MessagePacker packer) throws IOException { packer.packString(SERIAL); packer.packString(serial); } - if(version != null) { - packer.packString(VERSION); - packer.packString(version); - } if(action != null) { packer.packString(ACTION); packer.packInt(action.ordinal()); @@ -197,8 +183,6 @@ Message readMsgpack(MessageUnpacker unpacker) throws IOException { extras = MessageExtras.read(unpacker); } else if (fieldName.equals(SERIAL)) { serial = unpacker.unpackString(); - } else if (fieldName.equals(VERSION)) { - version = unpacker.unpackString(); } else if (fieldName.equals(ACTION)) { action = MessageAction.tryFindByOrdinal(unpacker.unpackInt()); } else { @@ -359,7 +343,6 @@ protected void read(final JsonObject map) throws MessageDecodeException { } serial = readString(map, SERIAL); - version = readString(map, VERSION); Integer actionOrdinal = readInt(map, ACTION); action = actionOrdinal == null ? null : MessageAction.tryFindByOrdinal(actionOrdinal); } @@ -380,9 +363,6 @@ public JsonElement serialize(Message message, Type typeOfMessage, JsonSerializat if (message.serial != null) { json.addProperty(SERIAL, message.serial); } - if (message.version != null) { - json.addProperty(VERSION, message.version); - } if (message.action != null) { json.addProperty(ACTION, message.action.ordinal()); }