Update to new calling turn info endpoint, add support for turn server ips.

Co-authored-by: Adel Lahlou <adel@signal.com>
This commit is contained in:
adel-signal
2024-04-01 05:32:03 -07:00
committed by Greyson Parrelli
parent 03d3ae7043
commit f01e044662
4 changed files with 36 additions and 2 deletions

View File

@@ -13,9 +13,15 @@ public class TurnServerInfo {
@JsonProperty
private String password;
@JsonProperty
private String hostname;
@JsonProperty
private List<String> urls;
@JsonProperty
private List<String> urlsWithIps;
public String getUsername() {
return username;
}
@@ -24,7 +30,16 @@ public class TurnServerInfo {
return password;
}
// Hostname for the ips in urlsWithIps
public String getHostname() {
return hostname;
}
public List<String> getUrls() {
return urls;
}
public List<String> getUrlsWithIps() {
return urlsWithIps;
}
}

View File

@@ -216,7 +216,6 @@ public class PushServiceSocket {
private static final String TAG = PushServiceSocket.class.getSimpleName();
private static final String REGISTER_GCM_PATH = "/v1/accounts/gcm/";
private static final String TURN_SERVER_INFO = "/v1/accounts/turn";
private static final String SET_ACCOUNT_ATTRIBUTES = "/v1/accounts/attributes/";
private static final String PIN_PATH = "/v1/accounts/pin/";
private static final String REGISTRATION_LOCK_PATH = "/v1/accounts/registration_lock";
@@ -238,6 +237,7 @@ public class PushServiceSocket {
private static final String PREKEY_DEVICE_PATH = "/v2/keys/%s/%s";
private static final String PREKEY_CHECK_PATH = "/v2/keys/check";
private static final String TURN_SERVER_INFO = "/v1/calling/relays";
private static final String PROVISIONING_CODE_PATH = "/v1/devices/provisioning/code";
private static final String PROVISIONING_MESSAGE_PATH = "/v1/provisioning/%s";