]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/helper/AttachmentHelper.java
Add command to get an attachment (#1080)
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / helper / AttachmentHelper.java
index ea5739b385907833d55beb2cea6f4a461a1da6f5..b4b0d04b9d3d2300bd5145da58babe853346bb99 100644 (file)
@@ -13,6 +13,7 @@ import org.whispersystems.signalservice.api.messages.SignalServiceAttachment;
 import org.whispersystems.signalservice.api.messages.SignalServiceAttachmentPointer;
 import org.whispersystems.signalservice.api.messages.SignalServiceAttachmentStream;
 import org.whispersystems.signalservice.api.push.exceptions.MissingConfigurationException;
+import org.whispersystems.signalservice.api.util.StreamDetails;
 
 import java.io.File;
 import java.io.IOException;
@@ -38,6 +39,11 @@ public class AttachmentHelper {
         return attachmentStore.getAttachmentFile(pointer);
     }
 
+    public StreamDetails retrieveAttachment(final String id) throws IOException {
+        return attachmentStore.retrieveAttachment(id);
+    }
+
+
     public List<SignalServiceAttachment> uploadAttachments(final List<String> attachments) throws AttachmentInvalidException, IOException {
         var attachmentStreams = AttachmentUtils.createAttachmentStreams(attachments);