mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Add possibility to update the device name
This commit is contained in:
parent
5a2e37a6e2
commit
299671480f
5 changed files with 24 additions and 6 deletions
|
@ -20,14 +20,16 @@ public class UpdateAccountCommand implements JsonRpcLocalCommand {
|
|||
@Override
|
||||
public void attachToSubparser(final Subparser subparser) {
|
||||
subparser.help("Update the account attributes on the signal server.");
|
||||
subparser.addArgument("-n", "--device-name").help("Specify a name to describe this device.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleCommand(
|
||||
final Namespace ns, final Manager m, final OutputWriter outputWriter
|
||||
) throws CommandException {
|
||||
var deviceName = ns.getString("device-name");
|
||||
try {
|
||||
m.updateAccountAttributes();
|
||||
m.updateAccountAttributes(deviceName);
|
||||
} catch (IOException e) {
|
||||
throw new IOErrorException("UpdateAccount error: " + e.getMessage());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue