X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/382d8d22d0ccad109106b140616638799cc646f6..06e93b84da2718c31111e820cd35a3354f22bae2:/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java diff --git a/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java b/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java index bde5113a..5421d4ad 100644 --- a/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java +++ b/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java @@ -131,7 +131,7 @@ public class DbusManagerImpl implements Manager { emptyIfNull(about), emptyIfNull(aboutEmoji), avatar == null ? "" : avatar.map(File::getPath).orElse(""), - avatar != null && !avatar.isPresent()); + avatar != null && avatar.isEmpty()); } @Override @@ -381,6 +381,16 @@ public class DbusManagerImpl implements Manager { return new SendMessageResults(0, Map.of()); } + @Override + public void deleteRecipient(final RecipientIdentifier.Single recipient) throws IOException { + signal.deleteRecipient(recipient.getIdentifier()); + } + + @Override + public void deleteContact(final RecipientIdentifier.Single recipient) throws IOException { + signal.deleteContact(recipient.getIdentifier()); + } + @Override public void setContactName( final RecipientIdentifier.Single recipient, final String name @@ -680,6 +690,7 @@ public class DbusManagerImpl implements Manager { false, Optional.empty(), Optional.empty(), + Optional.empty(), getAttachments(extras), Optional.empty(), Optional.empty(), @@ -749,6 +760,7 @@ public class DbusManagerImpl implements Manager { false, Optional.empty(), Optional.empty(), + Optional.empty(), getAttachments(extras), Optional.empty(), Optional.empty(), @@ -774,9 +786,8 @@ public class DbusManagerImpl implements Manager { private void notifyMessageHandlers(final MessageEnvelope envelope) { synchronized (messageHandlers) { - Stream.concat(messageHandlers.stream(), weakHandlers.stream()).forEach(h -> { - h.handleMessage(envelope, null); - }); + Stream.concat(messageHandlers.stream(), weakHandlers.stream()) + .forEach(h -> h.handleMessage(envelope, null)); } }