mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-11-29 08:55:48 +00:00
Load recipient profiles in listContacts command if required
This commit is contained in:
1 parent
10fa3e1619
commit
2ea26b9d1b
1 file changed
+15
-1
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user