]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/JsonAttachment.java
Output json when receiving messages from dbus and --json parameter is given
[signal-cli] / src / main / java / org / asamk / signal / JsonAttachment.java
diff --git a/src/main/java/org/asamk/signal/JsonAttachment.java b/src/main/java/org/asamk/signal/JsonAttachment.java
deleted file mode 100644 (file)
index 5816563..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.asamk.signal;
-
-import org.whispersystems.signalservice.api.messages.SignalServiceAttachment;
-import org.whispersystems.signalservice.api.messages.SignalServiceAttachmentPointer;
-
-class JsonAttachment {
-
-    String contentType;
-    String filename;
-    String id;
-    int size;
-
-    JsonAttachment(SignalServiceAttachment attachment) {
-        this.contentType = attachment.getContentType();
-
-        final SignalServiceAttachmentPointer pointer = attachment.asPointer();
-        if (attachment.isPointer()) {
-            this.id = String.valueOf(pointer.getId());
-            if (pointer.getFileName().isPresent()) {
-                this.filename = pointer.getFileName().get();
-            }
-            if (pointer.getSize().isPresent()) {
-                this.size = pointer.getSize().get();
-            }
-        }
-    }
-}