X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/ba817e2ae4147b201fbb3e5eb8c86e359873ec02..7c9fd9d0fb7b303e8194a6de9aed852c488afc25:/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java diff --git a/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java b/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java index c73918ef..e975a671 100644 --- a/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java +++ b/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java @@ -276,7 +276,7 @@ public class DbusSignalImpl implements Signal { ) throws Error.AttachmentInvalid, Error.Failure, Error.UntrustedIdentity { try { final var results = m.sendMessage(new Message(message, attachments), - Set.of(new RecipientIdentifier.NoteToSelf())); + Set.of(RecipientIdentifier.NoteToSelf.INSTANCE)); checkSendMessageResults(results.getTimestamp(), results.getResults()); return results.getTimestamp(); } catch (AttachmentInvalidException e) { @@ -505,14 +505,14 @@ public class DbusSignalImpl implements Signal { final String aboutEmoji, String avatarPath, final boolean removeAvatar - ) { + ) { try { if (avatarPath.isEmpty()) { avatarPath = null; } Optional avatarFile = removeAvatar ? Optional.absent() - : avatarPath == null ? null : Optional.of(new File(avatarPath)); + : avatarPath == null ? null : Optional.of(new File(avatarPath)); m.setProfile(givenName, familyName, about, aboutEmoji, avatarFile); } catch (IOException e) { throw new Error.Failure(e.getMessage());