mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Refactor contact and profile store
This commit is contained in:
parent
a96bd91770
commit
224d8194cc
31 changed files with 1393 additions and 729 deletions
|
@ -18,6 +18,7 @@ import org.whispersystems.signalservice.api.messages.calls.SignalServiceCallMess
|
|||
import org.whispersystems.signalservice.api.messages.multidevice.SignalServiceSyncMessage;
|
||||
import org.whispersystems.signalservice.api.messages.shared.SharedContact;
|
||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
||||
import org.whispersystems.signalservice.api.util.InvalidNumberException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Base64;
|
||||
|
@ -667,7 +668,11 @@ public class ReceiveMessageHandler implements Manager.ReceiveMessageHandler {
|
|||
|
||||
private String formatContact(SignalServiceAddress address) {
|
||||
final var number = address.getLegacyIdentifier();
|
||||
var name = m.getContactOrProfileName(number);
|
||||
String name = null;
|
||||
try {
|
||||
name = m.getContactOrProfileName(number);
|
||||
} catch (InvalidNumberException ignored) {
|
||||
}
|
||||
if (name == null || name.isEmpty()) {
|
||||
return number;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue