Convert RecipientAddress to record

This commit is contained in:
AsamK 2021-12-06 18:55:37 +01:00
parent c3a9022bec
commit 8867a7b9ee
14 changed files with 59 additions and 91 deletions

View file

@ -679,7 +679,7 @@ public class DbusSignalImpl implements Signal {
public List<String> listNumbers() {
return Stream.concat(m.getIdentities().stream().map(Identity::recipient),
m.getContacts().stream().map(Pair::first))
.map(a -> a.getNumber().orElse(null))
.map(a -> a.number().orElse(null))
.filter(Objects::nonNull)
.distinct()
.collect(Collectors.toList());
@ -698,7 +698,7 @@ public class DbusSignalImpl implements Signal {
// Try profiles if no contact name was found
for (var identity : m.getIdentities()) {
final var address = identity.recipient();
var number = address.getNumber().orElse(null);
var number = address.number().orElse(null);
if (number != null) {
Profile profile = null;
try {