mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-03-14 02:30:15 +00:00
Load recipient profiles in listContacts command if required
This commit is contained in:
parent
10fa3e1619
commit
2ea26b9d1b
@ -1479,7 +1479,21 @@ public class ManagerImpl implements Manager {
|
||||
return List.of();
|
||||
}
|
||||
// refresh profiles of explicitly given recipients
|
||||
context.getProfileHelper().refreshRecipientProfiles(recipientIds);
|
||||
if (recipientIds.isEmpty()) {
|
||||
final var rIds = account.getRecipientStore()
|
||||
.getRecipients(onlyContacts, blocked, recipientIds, name)
|
||||
.stream()
|
||||
.filter(r -> r.isRegistered())
|
||||
.map(r -> r.getRecipientId())
|
||||
.toList();
|
||||
try {
|
||||
context.getProfileHelper().getRecipientProfiles(rIds);
|
||||
} catch (Exception e) {
|
||||
logger.warn("Failed to refresh profiles for recipients", e);
|
||||
}
|
||||
} else {
|
||||
context.getProfileHelper().refreshRecipientProfiles(recipientIds);
|
||||
}
|
||||
return account.getRecipientStore()
|
||||
.getRecipients(onlyContacts, blocked, recipientIds, name)
|
||||
.stream()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user