comparison libervia.py @ 235:b304cdf13a3b

browser and server side: XHTML handling, first draft: - added the extra parameter for getHistory and newMessage to manage xhtml - if present, XHTML is shown instead of regular text message
author Goffi <goffi@goffi.org>
date Thu, 07 Nov 2013 15:22:00 +0100
parents 266e9678eec0
children b911f2b43fd4
comparison
equal deleted inserted replaced
234:d4e73d9140af 235:b304cdf13a3b
505 # for example to scroll to the bottom 505 # for example to scroll to the bottom
506 self.setSelected(lib_wid) 506 self.setSelected(lib_wid)
507 lib_wid.refresh() 507 lib_wid.refresh()
508 return lib_wid 508 return lib_wid
509 509
510 def _newMessageCb(self, from_jid, msg, msg_type, to_jid): 510 def _newMessageCb(self, from_jid, msg, msg_type, to_jid, extra):
511 _from = JID(from_jid) 511 _from = JID(from_jid)
512 _to = JID(to_jid) 512 _to = JID(to_jid)
513 other = _to if _from.bare == self.whoami.bare else _from 513 other = _to if _from.bare == self.whoami.bare else _from
514 lib_wid = self.getLiberviaWidget(panels.ChatPanel, other, ignoreOtherTabs=False) 514 lib_wid = self.getLiberviaWidget(panels.ChatPanel, other, ignoreOtherTabs=False)
515 if lib_wid is not None: 515 if lib_wid is not None:
516 lib_wid.printMessage(_from, msg) 516 lib_wid.printMessage(_from, msg, extra)
517 else: 517 else:
518 # The message has not been showed, we must indicate it 518 # The message has not been showed, we must indicate it
519 self.contact_panel.setContactMessageWaiting(other.bare, True) 519 self.contact_panel.setContactMessageWaiting(other.bare, True)
520 520
521 def _presenceUpdateCb(self, entity, show, priority, statuses): 521 def _presenceUpdateCb(self, entity, show, priority, statuses):