Use app id as dbus name for flatpak version

This commit is contained in:
AsamK 2024-02-09 17:59:18 +01:00
parent 1bf703b012
commit 4e61f2b2e5

View file

@ -2,13 +2,20 @@ package org.asamk.signal;
import org.asamk.signal.dbus.DbusUtils;
import java.io.File;
public class DbusConfig {
private static final String SIGNAL_BUSNAME = "org.asamk.Signal";
private static final String SIGNAL_BUSNAME_FLATPAK = "org.asamk.SignalCli";
private static final String SIGNAL_OBJECT_BASE_PATH = "/org/asamk/Signal";
public static String getBusname() {
return SIGNAL_BUSNAME;
if (new File("/.flatpak-info").exists()) {
return SIGNAL_BUSNAME_FLATPAK;
} else {
return SIGNAL_BUSNAME;
}
}
public static String getObjectPath() {