Allow calling signal-cli without -u flag

For daemon command all local users will be exposed as dbus objects
If only one local user exists, all other commands will use that user,
otherwise a user has to be specified.
This commit is contained in:
AsamK 2021-01-15 18:28:54 +01:00
parent a97bbf8608
commit ca86c421eb
19 changed files with 356 additions and 172 deletions

View file

@ -3,8 +3,14 @@ package org.asamk.signal.commands;
import net.sourceforge.argparse4j.inf.Namespace;
import org.asamk.Signal;
import org.asamk.signal.dbus.DbusSignalImpl;
import org.asamk.signal.manager.Manager;
public interface DbusCommand extends Command {
public interface DbusCommand extends LocalCommand {
int handleCommand(Namespace ns, Signal signal);
default int handleCommand(final Namespace ns, final Manager m) {
return handleCommand(ns, new DbusSignalImpl(m));
}
}