X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/ce70a623c21a267679d59838d041f9bc1d486cd9..1e87240db8a7d476d66e296701202413d94061c9:/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 ea591224..1028392c 100644 --- a/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java +++ b/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java @@ -32,7 +32,6 @@ import org.freedesktop.dbus.exceptions.DBusException; import org.freedesktop.dbus.interfaces.DBusInterface; import org.whispersystems.libsignal.InvalidKeyException; import org.whispersystems.libsignal.util.Pair; -import org.whispersystems.libsignal.util.guava.Optional; import org.whispersystems.signalservice.api.groupsv2.GroupLinkNotActiveException; import org.whispersystems.signalservice.api.messages.SignalServiceAttachmentRemoteId; import org.whispersystems.signalservice.api.push.SignalServiceAddress; @@ -48,6 +47,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.Set; import java.util.UUID; import java.util.concurrent.TimeUnit; @@ -122,7 +122,7 @@ public class DbusManagerImpl implements Manager { emptyIfNull(familyName), emptyIfNull(about), emptyIfNull(aboutEmoji), - avatar == null ? "" : avatar.transform(File::getPath).or(""), + avatar == null ? "" : avatar.map(File::getPath).orElse(""), avatar != null && !avatar.isPresent()); } @@ -321,9 +321,9 @@ public class DbusManagerImpl implements Manager { final Message message, final Set recipients ) throws IOException, AttachmentInvalidException, NotAGroupMemberException, GroupNotFoundException, GroupSendingNotAllowedException { return handleMessage(recipients, - numbers -> signal.sendMessage(message.getMessageText(), message.getAttachments(), numbers), - () -> signal.sendNoteToSelfMessage(message.getMessageText(), message.getAttachments()), - groupId -> signal.sendGroupMessage(message.getMessageText(), message.getAttachments(), groupId)); + numbers -> signal.sendMessage(message.messageText(), message.attachments(), numbers), + () -> signal.sendNoteToSelfMessage(message.messageText(), message.attachments()), + groupId -> signal.sendGroupMessage(message.messageText(), message.attachments(), groupId)); } @Override