mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-25 01:54:26 +01:00
Cleanup
This commit is contained in:
@@ -26,8 +26,7 @@ public class JsonContactsStore {
|
||||
}
|
||||
|
||||
ContactInfo getContact(String number) {
|
||||
ContactInfo c = contacts.get(number);
|
||||
return c;
|
||||
return contacts.get(number);
|
||||
}
|
||||
|
||||
List<ContactInfo> getContacts() {
|
||||
|
||||
@@ -1041,8 +1041,11 @@ class Manager implements Signal {
|
||||
DeviceContactsInputStream s = new DeviceContactsInputStream(retrieveAttachmentAsStream(syncMessage.getContacts().get().asPointer()));
|
||||
DeviceContact c;
|
||||
while ((c = s.read()) != null) {
|
||||
ContactInfo contact = new ContactInfo();
|
||||
contact.number = c.getNumber();
|
||||
ContactInfo contact = contactStore.getContact(c.getNumber());
|
||||
if (contact == null) {
|
||||
contact = new ContactInfo();
|
||||
contact.number = c.getNumber();
|
||||
}
|
||||
if (c.getName().isPresent()) {
|
||||
contact.name = c.getName().get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user