comparison libervia/web/pages/chat/_browser/__init__.py @ 1596:52098b5bab8d

browser (chat): add data for reactions
author Goffi <goffi@goffi.org>
date Wed, 13 Dec 2023 22:06:05 +0100
parents 7941444c1671
children 19c83dd943df
comparison
equal deleted inserted replaced
1595:7941444c1671 1596:52098b5bab8d
187 reactions_wrapper_elt = document[f"msg_reactions_{uid}"] 187 reactions_wrapper_elt = document[f"msg_reactions_{uid}"]
188 except KeyError: 188 except KeyError:
189 log.debug(f"Message {uid} not found, no reactions to update") 189 log.debug(f"Message {uid} not found, no reactions to update")
190 else: 190 else:
191 log.debug(f"Message {uid} found, new reactions: {reactions}") 191 log.debug(f"Message {uid} found, new reactions: {reactions}")
192 reactions_elt = self.reactions_tpl.get_elt({"reactions": reactions}) 192 reactions_elt = self.reactions_tpl.get_elt(
193 {
194 "chat_type": chat_type,
195 "own_local_jid": str(own_local_jid),
196 "reactions": reactions
197 })
193 reactions_wrapper_elt.clear() 198 reactions_wrapper_elt.clear()
194 reactions_wrapper_elt <= reactions_elt 199 reactions_wrapper_elt <= reactions_elt
195 self.add_reactions_listeners(reactions_elt) 200 self.add_reactions_listeners(reactions_elt)
196 elif type_ in ("EDIT", "RETRACT"): 201 elif type_ in ("EDIT", "RETRACT"):
197 try: 202 try: