mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50:39 +00:00
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:
parent
a97bbf8608
commit
ca86c421eb
19 changed files with 356 additions and 172 deletions
|
@ -2,6 +2,22 @@ package org.asamk.signal;
|
|||
|
||||
public class DbusConfig {
|
||||
|
||||
public static final String SIGNAL_BUSNAME = "org.asamk.Signal";
|
||||
public static final String SIGNAL_OBJECTPATH = "/org/asamk/Signal";
|
||||
private static final String SIGNAL_BUSNAME = "org.asamk.Signal";
|
||||
private static final String SIGNAL_OBJECT_BASE_PATH = "/org/asamk/Signal";
|
||||
|
||||
public static String getBusname() {
|
||||
return SIGNAL_BUSNAME;
|
||||
}
|
||||
|
||||
public static String getObjectPath() {
|
||||
return getObjectPath(null);
|
||||
}
|
||||
|
||||
public static String getObjectPath(String username) {
|
||||
if (username == null) {
|
||||
return SIGNAL_OBJECT_BASE_PATH;
|
||||
}
|
||||
|
||||
return SIGNAL_OBJECT_BASE_PATH + "/" + username.replace('+', '_');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue