mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-05-18 13:14:14 +00:00
parent
d40f62ec21
commit
e6b33b8da7
@ -41,6 +41,9 @@ public class GetAttachmentCommand implements JsonRpcLocalCommand {
|
|||||||
) throws CommandException {
|
) throws CommandException {
|
||||||
|
|
||||||
final var id = ns.getString("id");
|
final var id = ns.getString("id");
|
||||||
|
if (id == null) {
|
||||||
|
throw new UserErrorException("Missing attachment id parameter");
|
||||||
|
}
|
||||||
|
|
||||||
try (InputStream attachment = m.retrieveAttachment(id)) {
|
try (InputStream attachment = m.retrieveAttachment(id)) {
|
||||||
final var bytes = attachment.readAllBytes();
|
final var bytes = attachment.readAllBytes();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user