mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
parent
352699c4b6
commit
c6e93126fa
2 changed files with 3 additions and 2 deletions
|
@ -14,6 +14,7 @@ import org.whispersystems.signalservice.api.push.ServiceId;
|
||||||
import org.whispersystems.signalservice.api.push.ServiceId.ACI;
|
import org.whispersystems.signalservice.api.push.ServiceId.ACI;
|
||||||
import org.whispersystems.signalservice.api.push.ServiceId.PNI;
|
import org.whispersystems.signalservice.api.push.ServiceId.PNI;
|
||||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
||||||
|
import org.whispersystems.signalservice.api.push.exceptions.CdsiInvalidArgumentException;
|
||||||
import org.whispersystems.signalservice.api.push.exceptions.CdsiInvalidTokenException;
|
import org.whispersystems.signalservice.api.push.exceptions.CdsiInvalidTokenException;
|
||||||
import org.whispersystems.signalservice.api.services.CdsiV2Service;
|
import org.whispersystems.signalservice.api.services.CdsiV2Service;
|
||||||
|
|
||||||
|
@ -254,7 +255,7 @@ public class RecipientHelper {
|
||||||
account.setLastRecipientsRefresh(System.currentTimeMillis());
|
account.setLastRecipientsRefresh(System.currentTimeMillis());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (CdsiInvalidTokenException e) {
|
} catch (CdsiInvalidTokenException | CdsiInvalidArgumentException e) {
|
||||||
account.setCdsiToken(null);
|
account.setCdsiToken(null);
|
||||||
account.getCdsiStore().clearAll();
|
account.getCdsiStore().clearAll();
|
||||||
throw e;
|
throw e;
|
||||||
|
|
|
@ -156,7 +156,7 @@ public class CdsiStore {
|
||||||
public void clearAll() {
|
public void clearAll() {
|
||||||
final var sql = (
|
final var sql = (
|
||||||
"""
|
"""
|
||||||
TRUNCATE %s
|
DELETE FROM %s
|
||||||
"""
|
"""
|
||||||
).formatted(TABLE_CDSI);
|
).formatted(TABLE_CDSI);
|
||||||
try (final var connection = database.getConnection()) {
|
try (final var connection = database.getConnection()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue