Mercurial > libervia-web
diff libervia/web/pages/chat/page_meta.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 | f00497c00e38 |
children |
line wrap: on
line diff
--- a/libervia/web/pages/chat/page_meta.py Wed Dec 13 22:03:49 2023 +0100 +++ b/libervia/web/pages/chat/page_meta.py Wed Dec 13 22:05:48 2023 +0100 @@ -67,14 +67,14 @@ __) = join_ret template_data["subject"] = room_subject template_data["room_statuses"] = room_statuses - own_jid = jid.JID(room_jid_s) - own_jid = own_jid.change_resource(user_nick) + own_local_jid = jid.JID(room_jid_s) + own_local_jid = own_local_jid.change_resource(user_nick) else: room_subject = None chat_type = C.CHAT_ONE2ONE - own_jid = profile_jid + own_local_jid = profile_jid rdata["chat_type"] = chat_type - template_data["own_jid"] = own_jid + template_data["own_local_jid"] = own_local_jid history = await self.host.bridge_call( "history_get", @@ -100,7 +100,7 @@ self.expose_to_scripts( request, room_subject=room_subject, - own_jid=str(own_jid), + own_local_jid=str(own_local_jid), target_jid=target_jid, chat_type=chat_type, )