From efa1c43b0bdeb6e7b12d252492194448543d70fb Mon Sep 17 00:00:00 2001 From: AsamK Date: Tue, 24 Mar 2020 14:34:00 +0100 Subject: [PATCH] Get uuids from contact store when resolving numbers --- src/main/java/org/asamk/signal/manager/Manager.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/asamk/signal/manager/Manager.java b/src/main/java/org/asamk/signal/manager/Manager.java index caba52ac..c928ec17 100644 --- a/src/main/java/org/asamk/signal/manager/Manager.java +++ b/src/main/java/org/asamk/signal/manager/Manager.java @@ -1138,8 +1138,11 @@ public class Manager implements Signal { if (canonicalizedNumber.equals(username)) { signalServiceAddresses.add(account.getSelfAddress()); } else { - // TODO get corresponding uuid - signalServiceAddresses.add(new SignalServiceAddress(null, canonicalizedNumber)); + SignalServiceAddress address = new SignalServiceAddress(null, canonicalizedNumber); + ContactInfo contact = account.getContactStore().getContact(address); + signalServiceAddresses.add(contact == null + ? address + : contact.getAddress()); } } return signalServiceAddresses;