Add setting for requesting user account data.

This commit is contained in:
Clark
2023-03-23 14:39:31 -04:00
committed by Cody Henthorne
parent b194c0e84b
commit d6a9ed1a8d
18 changed files with 874 additions and 9 deletions

View File

@@ -620,6 +620,9 @@ public class SignalServiceAccountManager {
return out;
}
public String getAccountDataReport() throws IOException {
return pushServiceSocket.getAccountDataReport();
}
public String getNewDeviceVerificationCode() throws IOException {
return this.pushServiceSocket.getNewDeviceVerificationCode();

View File

@@ -213,6 +213,7 @@ public class PushServiceSocket {
private static final String DELETE_ACCOUNT_PATH = "/v1/accounts/me";
private static final String CHANGE_NUMBER_PATH = "/v2/accounts/number";
private static final String IDENTIFIER_REGISTERED_PATH = "/v1/accounts/account/%s";
private static final String REQUEST_ACCOUNT_DATA_PATH = "/v2/accounts/data_report";
private static final String PREKEY_METADATA_PATH = "/v2/keys?identity=%s";
private static final String PREKEY_PATH = "/v2/keys/%s?identity=%s";
@@ -418,6 +419,10 @@ public class PushServiceSocket {
}
}
public String getAccountDataReport() throws IOException {
return makeServiceRequest(REQUEST_ACCOUNT_DATA_PATH, "GET", null);
}
public CdsiAuthResponse getCdsiAuth() throws IOException {
String body = makeServiceRequest(CDSI_AUTH, "GET", null);
return JsonUtil.fromJsonResponse(body, CdsiAuthResponse.class);