Revert delete account conversion to WebSocket.

This commit is contained in:
Cody Henthorne
2025-03-12 16:13:50 -04:00
committed by Greyson Parrelli
parent 6d956ca0f9
commit ddda5e8b47
3 changed files with 11 additions and 3 deletions

View File

@@ -124,6 +124,10 @@ public class SignalServiceAccountManager {
return NetworkResultUtil.toBasicLegacy(accountApi.whoAmI());
}
public void deleteAccount() throws IOException {
this.pushServiceSocket.deleteAccount();
}
/**
* Request a push challenge. A number will be pushed to the GCM (FCM) id. This can then be used
* during SMS/call requests to bypass the CAPTCHA.

View File

@@ -191,6 +191,8 @@ public class PushServiceSocket {
private static final String TAG = PushServiceSocket.class.getSimpleName();
private static final String DELETE_ACCOUNT_PATH = "/v1/accounts/me";
private static final String PREKEY_METADATA_PATH = "/v2/keys?identity=%s";
private static final String PREKEY_PATH = "/v2/keys?identity=%s";
private static final String PREKEY_DEVICE_PATH = "/v2/keys/%s/%s";
@@ -912,6 +914,10 @@ public class PushServiceSocket {
return JsonUtil.fromJson(response, BackupV3AuthCheckResponse.class);
}
public void deleteAccount() throws IOException {
makeServiceRequest(DELETE_ACCOUNT_PATH, "DELETE", null);
}
public void redeemDonationReceipt(ReceiptCredentialPresentation receiptCredentialPresentation, boolean visible, boolean primary) throws IOException {
String payload = JsonUtil.toJson(new RedeemDonationReceiptRequest(Base64.encodeWithPadding(receiptCredentialPresentation.serialize()), visible, primary));
makeServiceRequest(DONATION_REDEEM_RECEIPT, "POST", payload);