Prevent unregistered clients from repeatedly attempting an auth WebSockect connection.

This commit is contained in:
Cody Henthorne
2025-03-19 09:47:28 -04:00
committed by Alex Hart
parent 49f764a392
commit 5a0def7390
3 changed files with 21 additions and 11 deletions

View File

@@ -390,14 +390,12 @@ public class TextSecurePreferences {
if (previous != value) {
Recipient.self().live().refresh();
if (value) {
notifyUnregisteredReceived(context);
clearLocalCredentials(context);
}
}
if (value) {
clearLocalCredentials(context);
}
}
public static boolean isUnauthorizedReceived(Context context) {
@@ -895,7 +893,6 @@ public class TextSecurePreferences {
}
private static void clearLocalCredentials(Context context) {
ProfileKey newProfileKey = ProfileKeyUtil.createNew();
Recipient self = Recipient.self();
SignalDatabase.recipients().setProfileKey(self.getId(), newProfileKey);