X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/382d8d22d0ccad109106b140616638799cc646f6..e83f43065ecd7922de75ea4f9262d6f2770369b2:/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 7f0c3b31..0baacecb 100644 --- a/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java +++ b/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java @@ -2,7 +2,6 @@ package org.asamk.signal.dbus; import org.asamk.Signal; import org.asamk.signal.BaseConfig; -import org.asamk.signal.DbusReceiveMessageHandler; import org.asamk.signal.manager.AttachmentInvalidException; import org.asamk.signal.manager.Manager; import org.asamk.signal.manager.NotMasterDeviceException; @@ -112,7 +111,7 @@ public class DbusSignalImpl implements Signal { @Override public void subscribeReceive() { if (dbusMessageHandler == null) { - dbusMessageHandler = new DbusReceiveMessageHandler(m, connection, objectPath); + dbusMessageHandler = new DbusReceiveMessageHandler(connection, objectPath); m.addReceiveHandler(dbusMessageHandler); } subscriberCount++; @@ -200,7 +199,7 @@ public class DbusSignalImpl implements Signal { @Override public long sendMessage(final String message, final List attachments, final List recipients) { try { - final var results = m.sendMessage(new Message(message, attachments, List.of()), + final var results = m.sendMessage(new Message(message, attachments, List.of(), Optional.empty()), getSingleRecipientIdentifiers(recipients, m.getSelfNumber()).stream() .map(RecipientIdentifier.class::cast) .collect(Collectors.toSet())); @@ -365,7 +364,7 @@ public class DbusSignalImpl implements Signal { final String message, final List attachments ) throws Error.AttachmentInvalid, Error.Failure, Error.UntrustedIdentity { try { - final var results = m.sendMessage(new Message(message, attachments, List.of()), + final var results = m.sendMessage(new Message(message, attachments, List.of(), Optional.empty()), Set.of(RecipientIdentifier.NoteToSelf.INSTANCE)); checkSendMessageResults(results.timestamp(), results.results()); return results.timestamp(); @@ -391,7 +390,7 @@ public class DbusSignalImpl implements Signal { @Override public long sendGroupMessage(final String message, final List attachments, final byte[] groupId) { try { - var results = m.sendMessage(new Message(message, attachments, List.of()), + var results = m.sendMessage(new Message(message, attachments, List.of(), Optional.empty()), Set.of(new RecipientIdentifier.Group(getGroupId(groupId)))); checkSendMessageResults(results.timestamp(), results.results()); return results.timestamp();