diff libervia/pages/chat/page_meta.py @ 1266:6b7f9c3558cc

server, pages: better identities handling: - own identity is now retrieve on connection - use session identities all the time, fixed pages where an empty dict was used - identities and own_jid are alway set in template_data for normal rendering
author Goffi <goffi@goffi.org>
date Tue, 19 May 2020 11:02:32 +0200
parents 8aff742d0dd0
children 01936fc55cd9
line wrap: on
line diff
--- a/libervia/pages/chat/page_meta.py	Tue May 19 11:02:31 2020 +0200
+++ b/libervia/pages/chat/page_meta.py	Tue May 19 11:02:32 2020 +0200
@@ -84,14 +84,14 @@
         profile,
     )
     authors = {m[2] for m in history}
-    identities = {}
+    identities = session.identities
     for author in authors:
         id_raw = yield self.host.bridgeCall(
             "identityGet", author, [], True, profile)
         identities[author] = data_format.deserialise(id_raw)
 
     template_data["messages"] = data_objects.Messages(history)
-    rdata['identities'] = template_data["identities"] = identities
+    rdata['identities'] = identities
     template_data["target_jid"] = target_jid
     template_data["chat_type"] = chat_type