mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Add setIgnoreAttachments method
This commit is contained in:
parent
3636023cb8
commit
f5ba7894ae
6 changed files with 32 additions and 33 deletions
|
@ -148,14 +148,11 @@ public class ReceiveCommand implements ExtendedDbusCommand, LocalCommand {
|
|||
timeout = 3600;
|
||||
}
|
||||
boolean ignoreAttachments = Boolean.TRUE.equals(ns.getBoolean("ignore-attachments"));
|
||||
m.setIgnoreAttachments(ignoreAttachments);
|
||||
try {
|
||||
final var handler = outputWriter instanceof JsonWriter ? new JsonReceiveMessageHandler(m,
|
||||
(JsonWriter) outputWriter) : new ReceiveMessageHandler(m, (PlainTextWriter) outputWriter);
|
||||
m.receiveMessages((long) (timeout * 1000),
|
||||
TimeUnit.MILLISECONDS,
|
||||
returnOnTimeout,
|
||||
ignoreAttachments,
|
||||
handler);
|
||||
m.receiveMessages((long) (timeout * 1000), TimeUnit.MILLISECONDS, returnOnTimeout, handler);
|
||||
} catch (IOException e) {
|
||||
throw new IOErrorException("Error while receiving messages: " + e.getMessage(), e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue