diff --git a/sat_frontends/jp/base.py b/sat_frontends/jp/base.py index 7213bb76..9f0ce9b2 100644 --- a/sat_frontends/jp/base.py +++ b/sat_frontends/jp/base.py @@ -697,7 +697,10 @@ class LiberviaCli: await self.bridge.bridgeConnect() except Exception as e: if isinstance(e, exceptions.BridgeExceptionNoService): - print(_("Can't connect to SàT backend, are you sure it's launched ?")) + print( + _("Can't connect to Libervia backend, are you sure that it's " + "launched ?") + ) self.quit(C.EXIT_BACKEND_NOT_FOUND, raise_exc=False) elif isinstance(e, exceptions.BridgeInitError): print(_("Can't init bridge")) @@ -968,6 +971,13 @@ class LiberviaCli: return f"{_jid.bare}/{main_resource}" return param_jid + async def get_profile_jid(self): + """Retrieve current profile bare JID if possible""" + full_jid = await self.bridge.asyncGetParamA( + "JabberID", "Connection", profile_key=self.profile + ) + return full_jid.rsplit("/", 1)[0] + class CommandBase(object):