mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 15:18:05 +01:00
Consolidate account creation/directory updates into AccountsManager
This commit is contained in:
@@ -61,11 +61,15 @@ public class DirectoryQueue {
|
||||
this.sqs = sqs;
|
||||
}
|
||||
|
||||
public void refreshRegisteredUser(final Account account) {
|
||||
refreshRegisteredUsers(List.of(account));
|
||||
public boolean isDiscoverable(final Account account) {
|
||||
return account.isEnabled() && account.isDiscoverableByPhoneNumber();
|
||||
}
|
||||
|
||||
public void refreshRegisteredUsers(final List<Account> accounts) {
|
||||
public void refreshAccount(final Account account) {
|
||||
refreshAccounts(List.of(account));
|
||||
}
|
||||
|
||||
public void refreshAccounts(final List<Account> accounts) {
|
||||
final List<Pair<Account, String>> accountsAndActions = accounts.stream()
|
||||
.map(account -> new Pair<>(account, account.isEnabled() && account.isDiscoverableByPhoneNumber() ? "add" : "delete"))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Reference in New Issue
Block a user