Mercurial > libervia-web
changeset 1381:a53e22400dad
pages: helper method to get current profile's jid
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 20 Feb 2021 13:51:55 +0100 |
parents | df79874947d7 |
children | 21d30f5d582a |
files | libervia/server/pages.py |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libervia/server/pages.py Sat Feb 20 13:51:11 2021 +0100 +++ b/libervia/server/pages.py Sat Feb 20 13:51:55 2021 +0100 @@ -1595,6 +1595,15 @@ sat_session = self.host.getSessionData(request, session_iface.ISATSession) return sat_session.profile + def getJid(self, request): + """helper method to easily get current jid + + @return: current jid + """ + sat_session = self.host.getSessionData(request, session_iface.ISATSession) + return sat_session.jid + + def getRData(self, request): """helper method to get request data dict