X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/ca86c421ebb1a3930fa309a2d95a4090108c2e62..30e8e36635733b3e8c75a44e95785ba33cf55e61:/src/main/java/org/asamk/signal/DbusConfig.java diff --git a/src/main/java/org/asamk/signal/DbusConfig.java b/src/main/java/org/asamk/signal/DbusConfig.java index eb457c39..c4c923cf 100644 --- a/src/main/java/org/asamk/signal/DbusConfig.java +++ b/src/main/java/org/asamk/signal/DbusConfig.java @@ -1,5 +1,7 @@ package org.asamk.signal; +import org.asamk.signal.dbus.DbusUtils; + public class DbusConfig { private static final String SIGNAL_BUSNAME = "org.asamk.Signal"; @@ -13,11 +15,11 @@ public class DbusConfig { return getObjectPath(null); } - public static String getObjectPath(String username) { - if (username == null) { + public static String getObjectPath(String account) { + if (account == null) { return SIGNAL_OBJECT_BASE_PATH; } - return SIGNAL_OBJECT_BASE_PATH + "/" + username.replace('+', '_'); + return SIGNAL_OBJECT_BASE_PATH + "/" + DbusUtils.makeValidObjectPathElement(account); } }