mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-24 09:34:20 +01:00
Add possibility to update the device name
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user