mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 12:47:25 +00:00
Write gv2-3 capability.
This commit is contained in:
@@ -119,7 +119,7 @@ public class AccountAttributes {
|
|||||||
@JsonProperty
|
@JsonProperty
|
||||||
private boolean uuid;
|
private boolean uuid;
|
||||||
|
|
||||||
@JsonProperty("gv2-2")
|
@JsonProperty("gv2-3")
|
||||||
private boolean gv2;
|
private boolean gv2;
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
|
@@ -28,19 +28,19 @@ public final class AccountAttributesTest {
|
|||||||
"\"unidentifiedAccessKey\":\"AAAAAAAAAAAAAA==\"," +
|
"\"unidentifiedAccessKey\":\"AAAAAAAAAAAAAA==\"," +
|
||||||
"\"unrestrictedUnidentifiedAccess\":false," +
|
"\"unrestrictedUnidentifiedAccess\":false," +
|
||||||
"\"discoverableByPhoneNumber\":false," +
|
"\"discoverableByPhoneNumber\":false," +
|
||||||
"\"capabilities\":{\"uuid\":true,\"storage\":true,\"gv2-2\":true}}", json);
|
"\"capabilities\":{\"uuid\":true,\"storage\":true,\"gv2-3\":true}}", json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void gv2_true() {
|
public void gv2_true() {
|
||||||
String json = JsonUtil.toJson(new AccountAttributes.Capabilities(false, true, false));
|
String json = JsonUtil.toJson(new AccountAttributes.Capabilities(false, true, false));
|
||||||
assertEquals("{\"uuid\":false,\"storage\":false,\"gv2-2\":true}", json);
|
assertEquals("{\"uuid\":false,\"storage\":false,\"gv2-3\":true}", json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void gv2_false() {
|
public void gv2_false() {
|
||||||
String json = JsonUtil.toJson(new AccountAttributes.Capabilities(false, false, false));
|
String json = JsonUtil.toJson(new AccountAttributes.Capabilities(false, false, false));
|
||||||
assertEquals("{\"uuid\":false,\"storage\":false,\"gv2-2\":false}", json);
|
assertEquals("{\"uuid\":false,\"storage\":false,\"gv2-3\":false}", json);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Reference in New Issue
Block a user