- @Override
- public void handleCommand(final Namespace ns, final Manager m) throws CommandException {
- var inJson = ns.get("output") == OutputType.JSON || ns.getBoolean("json");
-
- // TODO delete later when "json" variable is removed
- if (ns.getBoolean("json")) {
- logger.warn("\"--json\" option has been deprecated, please use the global \"--output=json\" instead.");
+ private void printMessageExtras(final PlainTextWriter writer, final Map<String, Variant<?>> extras) {
+ if (extras.containsKey("attachments")) {
+ final List<DBusMap<String, Variant<?>>> attachments = getValue(extras, "attachments");
+ if (attachments.size() > 0) {
+ writer.println("Attachments:");
+ for (var attachment : attachments) {
+ final String value = getValue(attachment, "file");
+ writer.println("- Stored plaintext in: {}", value);
+ }
+ }