public void handleCommand(
final Namespace ns, final Manager m, final OutputWriter outputWriter
) throws CommandException {
- for (var contactNumber : CommandUtil.getSingleRecipientIdentifiers(ns.getList("recipient"), m.getUsername())) {
+ for (var contactNumber : CommandUtil.getSingleRecipientIdentifiers(ns.getList("recipient"),
+ m.getSelfNumber())) {
try {
m.setContactBlocked(contactNumber, false);
} catch (NotMasterDeviceException e) {
throw new UserErrorException("This command doesn't work on linked devices.");
} catch (IOException e) {
- throw new UnexpectedErrorException("Failed to sync unblock to linked devices: " + e.getMessage());
+ throw new UnexpectedErrorException("Failed to sync unblock to linked devices: " + e.getMessage(), e);
}
}
} catch (GroupNotFoundException e) {
logger.warn("Unknown group id: {}", groupId);
} catch (IOException e) {
- throw new UnexpectedErrorException("Failed to sync unblock to linked devices: " + e.getMessage());
+ throw new UnexpectedErrorException("Failed to sync unblock to linked devices: " + e.getMessage(), e);
}
}
}