mirror of
https://github.com/aljazceru/signal-cli.git
synced 2026-01-25 16:44:19 +01:00
Add command to get an attachment (#1080)
* Add command to get an attachment * Refactor retrieving of attachments to use StreamDetails * Refactor AttachmentCommand to GetAttachmentCommand * Minor improvements to GetAttachmentCommand * Use JSON serializer to serialize binary data Serializing the stream is better for memory handling than loading the whole thing into the file. * Clean up unneeded class * Added command to doc Co-authored-by: cedb <cedb@keylimebox.org>
This commit is contained in:
@@ -46,6 +46,7 @@ import org.freedesktop.dbus.types.Variant;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.time.Duration;
|
||||
@@ -916,6 +917,11 @@ public class DbusManagerImpl implements Manager {
|
||||
}).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream retrieveAttachment(final String id) throws IOException {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private <T> T getValue(
|
||||
final Map<String, Variant<?>> stringVariantMap, final String field
|
||||
|
||||
Reference in New Issue
Block a user