Mercurial > libervia-web
diff libervia/web/pages/chat/_browser/__init__.py @ 1595:7941444c1671
pages: set `own_local_jid` to avoid confusion with `own_jid`:
- `own_jid` is the real JID of the user.
- `own_local_jid` is the JID used in chat, which can be real JID, or a room JID.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 13 Dec 2023 22:05:48 +0100 |
parents | 9fc4120888be |
children | 52098b5bab8d |
line wrap: on
line diff
--- a/libervia/web/pages/chat/_browser/__init__.py Wed Dec 13 22:03:49 2023 +0100 +++ b/libervia/web/pages/chat/_browser/__init__.py Wed Dec 13 22:05:48 2023 +0100 @@ -15,7 +15,8 @@ log.warning = log.warn profile = window.profile or "" -own_jid = jid.JID(window.own_jid) +# JID used in the local chat (real JID for one2one, room JID otherwise) +own_local_jid = jid.JID(window.own_local_jid) target_jid = jid.JID(window.target_jid) chat_type = window.chat_type bridge = Bridge() @@ -253,7 +254,8 @@ from_jid = from_jid.bare return { - "own_jid": own_jid, + "own_local_jid": str(own_local_jid), + "chat_type": chat_type, "msg": { "id": uid, "timestamp": extra.get("updated", timestamp),