comparison libervia.tac @ 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 e632f77c4219
children a25aa882e09a
comparison
equal deleted inserted replaced
234:d4e73d9140af 235:b304cdf13a3b
307 def show(result_dbus): 307 def show(result_dbus):
308 result = [] 308 result = []
309 for line in result_dbus: 309 for line in result_dbus:
310 #XXX: we have to do this stupid thing because Python D-Bus use its own types instead of standard types 310 #XXX: we have to do this stupid thing because Python D-Bus use its own types instead of standard types
311 # and txJsonRPC doesn't accept D-Bus types, resulting in a empty query 311 # and txJsonRPC doesn't accept D-Bus types, resulting in a empty query
312 timestamp, from_jid, to_jid, message, mess_type = line 312 timestamp, from_jid, to_jid, message, mess_type, extra = line
313 result.append((float(timestamp), unicode(from_jid), unicode(to_jid), unicode(message), unicode(mess_type))) 313 result.append((float(timestamp), unicode(from_jid), unicode(to_jid), unicode(message), unicode(mess_type), dict(extra)))
314 return result 314 return result
315 d.addCallback(show) 315 d.addCallback(show)
316 return d 316 return d
317 317
318 def jsonrpc_joinMUC(self, room_jid, nick): 318 def jsonrpc_joinMUC(self, room_jid, nick):