Mercurial > libervia-web
diff libervia/web/pages/chat/page_meta.py @ 1619:a2cd4222c702
browser: Updates for new design:
This patch add code to handle the new design for chat.
New bridge method are used to invite users to MUC or get list of occupants.
A new modules is used for components, with a first one for collapsible cards.
rel 457
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 12 Apr 2025 00:21:45 +0200 |
parents | 7941444c1671 |
children |
line wrap: on
line diff
--- a/libervia/web/pages/chat/page_meta.py Sat Oct 26 23:07:01 2024 +0200 +++ b/libervia/web/pages/chat/page_meta.py Sat Apr 12 00:21:45 2025 +0200 @@ -24,9 +24,10 @@ try: target_jid_s = self.next_path(request) except IndexError: - # not chat jid, we redirect to jid selection page - self.page_redirect("chat_select", request) - return + target_jid_s = "goffi@tazar3.int" + # # not chat jid, we redirect to jid selection page + # self.page_redirect("chat_select", request) + # return try: target_jid = jid.JID(target_jid_s) @@ -50,6 +51,10 @@ profile = session.profile profile_jid = session.jid + bookmarks = data_format.deserialise( + await self.host.bridge_call( "bookmarks_list", "", profile) + ) + disco = await self.host.bridge_call( "disco_infos", target_jid.domain, "", True, profile ) @@ -97,12 +102,15 @@ rdata['identities'] = identities template_data["target_jid"] = target_jid template_data["chat_type"] = chat_type + template_data["bookmarks"] = bookmarks + template_data["chat_url"] = self.url self.expose_to_scripts( request, room_subject=room_subject, own_local_jid=str(own_local_jid), target_jid=target_jid, chat_type=chat_type, + chat_url=self.url )