mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-25 13:57:39 +00:00
Add ability to delete your Signal account from within the app.
This commit is contained in:
@@ -682,6 +682,10 @@ public class SignalServiceAccountManager {
|
||||
this.pushServiceSocket.deleteUsername();
|
||||
}
|
||||
|
||||
public void deleteAccount() throws IOException {
|
||||
this.pushServiceSocket.deleteAccount();
|
||||
}
|
||||
|
||||
public void setSoTimeoutMillis(long soTimeoutMillis) {
|
||||
this.pushServiceSocket.setSoTimeoutMillis(soTimeoutMillis);
|
||||
}
|
||||
|
@@ -164,6 +164,7 @@ public class PushServiceSocket {
|
||||
private static final String WHO_AM_I = "/v1/accounts/whoami";
|
||||
private static final String SET_USERNAME_PATH = "/v1/accounts/username/%s";
|
||||
private static final String DELETE_USERNAME_PATH = "/v1/accounts/username";
|
||||
private static final String DELETE_ACCOUNT_PATH = "/v1/accounts/me";
|
||||
|
||||
private static final String PREKEY_METADATA_PATH = "/v2/keys/";
|
||||
private static final String PREKEY_PATH = "/v2/keys/%s";
|
||||
@@ -749,6 +750,10 @@ public class PushServiceSocket {
|
||||
makeServiceRequest(DELETE_USERNAME_PATH, "DELETE", null);
|
||||
}
|
||||
|
||||
public void deleteAccount() throws IOException {
|
||||
makeServiceRequest(DELETE_ACCOUNT_PATH, "DELETE", null);
|
||||
}
|
||||
|
||||
public List<ContactTokenDetails> retrieveDirectory(Set<String> contactTokens)
|
||||
throws NonSuccessfulResponseCodeException, PushNetworkException
|
||||
{
|
||||
|
Reference in New Issue
Block a user