Get-and-set accounts, since other updates may have made them stale.

Co-authored-by: Chris Eager <79161849+eager-signal@users.noreply.github.com>
This commit is contained in:
gram-signalandChris Eager committed 2021-09-07 13:41:47 -06:00
1 parent b4aabd799b
commit b080a5db4d
1 file changed
+1 -1
@@ -27,7 +27,7 @@ public class ContactDiscoveryWriter extends AccountDatabaseCrawlerListener {
throws AccountDatabaseCrawlerRestartException {
for (Account account : chunkAccounts) {
if (account.isCanonicallyDiscoverable() != account.shouldBeVisibleInDirectory()) {
accounts.update(account);
accounts.get(account.getUuid()).ifPresent(accounts::update);
}
}
}