Skip to content

Commit

Permalink
Revert to Ably service wire protocol 1.0.
Browse files Browse the repository at this point in the history
This is because we need this SDK to take advantage of service-side support for automatic presence re-entry, because RTP17c (client-led automatic re-entry) is yet to be implemented in this SDK.
This is a temporary patch until we fix this properly under #859
  • Loading branch information
QuintinWillison committed Nov 24, 2022
1 parent b0a7e4d commit efaab30
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/src/main/java/io/ably/lib/transport/Defaults.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.Locale;

public class Defaults {
public static final float ABLY_VERSION_NUMBER = 1.1f;
public static final float ABLY_VERSION_NUMBER = 1.0f;

/**
* The level of compatibility with the Ably service that this SDK supports, also referred to as the 'wire protocol version'.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void realtime_websocket_param_test() {
* Defaults.ABLY_VERSION_PARAM, as ultimately the request param has been derived from those values.
*/
assertEquals("Verify correct version", requestParameters.get("v"),
Collections.singletonList("1.1"));
Collections.singletonList("1.0"));

/* Spec RSC7d3
* This test should not directly validate version against Defaults.ABLY_AGENT_VERSION, nor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void header_lib_channel_publish() {
* from those values.
*/
Assert.assertNotNull("Expected headers", headers);
Assert.assertEquals(headers.get("x-ably-version"), "1.1");
Assert.assertEquals(headers.get("x-ably-version"), "1.0");
Assert.assertEquals(headers.get("ably-agent"), expectedAblyAgentHeader);
} catch (AblyException e) {
e.printStackTrace();
Expand Down
2 changes: 1 addition & 1 deletion lib/src/test/java/io/ably/lib/transport/DefaultsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class DefaultsTest {

@Test
public void versions() {
assertThat(Defaults.ABLY_VERSION, is("1.1"));
assertThat(Defaults.ABLY_VERSION, is("1.0"));
}

@Test
Expand Down

0 comments on commit efaab30

Please sign in to comment.