comparison 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
comparison
equal deleted inserted replaced
1594:93abef9a3548 1595:7941444c1671
65 room_subject, 65 room_subject,
66 room_statuses, 66 room_statuses,
67 __) = join_ret 67 __) = join_ret
68 template_data["subject"] = room_subject 68 template_data["subject"] = room_subject
69 template_data["room_statuses"] = room_statuses 69 template_data["room_statuses"] = room_statuses
70 own_jid = jid.JID(room_jid_s) 70 own_local_jid = jid.JID(room_jid_s)
71 own_jid = own_jid.change_resource(user_nick) 71 own_local_jid = own_local_jid.change_resource(user_nick)
72 else: 72 else:
73 room_subject = None 73 room_subject = None
74 chat_type = C.CHAT_ONE2ONE 74 chat_type = C.CHAT_ONE2ONE
75 own_jid = profile_jid 75 own_local_jid = profile_jid
76 rdata["chat_type"] = chat_type 76 rdata["chat_type"] = chat_type
77 template_data["own_jid"] = own_jid 77 template_data["own_local_jid"] = own_local_jid
78 78
79 history = await self.host.bridge_call( 79 history = await self.host.bridge_call(
80 "history_get", 80 "history_get",
81 profile_jid.userhost(), 81 profile_jid.userhost(),
82 target_jid.bare, 82 target_jid.bare,
98 template_data["target_jid"] = target_jid 98 template_data["target_jid"] = target_jid
99 template_data["chat_type"] = chat_type 99 template_data["chat_type"] = chat_type
100 self.expose_to_scripts( 100 self.expose_to_scripts(
101 request, 101 request,
102 room_subject=room_subject, 102 room_subject=room_subject,
103 own_jid=str(own_jid), 103 own_local_jid=str(own_local_jid),
104 target_jid=target_jid, 104 target_jid=target_jid,
105 chat_type=chat_type, 105 chat_type=chat_type,
106 ) 106 )
107 107
108 108