final Namespace ns, final Manager m, final OutputWriter outputWriter
) throws CommandException {
var recipientString = ns.getString("recipient");
- var recipient = CommandUtil.getSingleRecipientIdentifier(recipientString, m.getUsername());
+ var recipient = CommandUtil.getSingleRecipientIdentifier(recipientString, m.getSelfNumber());
try {
var expiration = ns.getInt("expiration");
m.setContactName(recipient, name);
}
} catch (IOException e) {
- throw new IOErrorException("Update contact error: " + e.getMessage());
+ throw new IOErrorException("Update contact error: " + e.getMessage(), e);
} catch (NotMasterDeviceException e) {
throw new UserErrorException("This command doesn't work on linked devices.");
}