]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java
Update hypfvieh dbus-java 4.0 beta which uses native java unix sockets
[signal-cli] / src / main / java / org / asamk / signal / dbus / DbusSignalImpl.java
index 2983b2931f292eb7502e4529e683359c0021c029..812110b31bdf2fb11ae656ce53e400990db3d21c 100644 (file)
@@ -138,6 +138,24 @@ public class DbusSignalImpl implements Signal {
 
     }
 
+    @Override
+    public void unregister() throws Error.Failure {
+        try {
+            m.unregister();
+        } catch (IOException e) {
+            throw new Error.Failure("Failed to unregister: " + e.getMessage());
+        }
+    }
+
+    @Override
+    public void deleteAccount() throws Error.Failure {
+        try {
+            m.deleteAccount();
+        } catch (IOException e) {
+            throw new Error.Failure("Failed to delete account: " + e.getMessage());
+        }
+    }
+
     @Override
     public void addDevice(String uri) {
         try {
@@ -183,7 +201,7 @@ public class DbusSignalImpl implements Signal {
     @Override
     public long sendMessage(final String message, final List<String> attachments, final List<String> recipients) {
         try {
-            final var results = m.sendMessage(new Message(message, attachments),
+            final var results = m.sendMessage(new Message(message, attachments, List.of()),
                     getSingleRecipientIdentifiers(recipients, m.getSelfNumber()).stream()
                             .map(RecipientIdentifier.class::cast)
                             .collect(Collectors.toSet()));
@@ -349,7 +367,7 @@ public class DbusSignalImpl implements Signal {
             final String message, final List<String> attachments
     ) throws Error.AttachmentInvalid, Error.Failure, Error.UntrustedIdentity {
         try {
-            final var results = m.sendMessage(new Message(message, attachments),
+            final var results = m.sendMessage(new Message(message, attachments, List.of()),
                     Set.of(RecipientIdentifier.NoteToSelf.INSTANCE));
             checkSendMessageResults(results.timestamp(), results.results());
             return results.timestamp();
@@ -375,7 +393,7 @@ public class DbusSignalImpl implements Signal {
     @Override
     public long sendGroupMessage(final String message, final List<String> attachments, final byte[] groupId) {
         try {
-            var results = m.sendMessage(new Message(message, attachments),
+            var results = m.sendMessage(new Message(message, attachments, List.of()),
                     Set.of(new RecipientIdentifier.Group(getGroupId(groupId))));
             checkSendMessageResults(results.timestamp(), results.results());
             return results.timestamp();