comparison frontends/src/quick_frontend/quick_app.py @ 1223:802b7e6bf098

frontends: printInfo and printMessage timestamp attribute defaults to None instead of ''
author souliane <souliane@mailoo.org>
date Sat, 04 Oct 2014 10:23:13 +0200
parents e15d8a01cf6a
children 03661d1b216a
comparison
equal deleted inserted replaced
1222:e6e0ea4dc835 1223:802b7e6bf098
306 self.current_action_ids = set() 306 self.current_action_ids = set()
307 self.current_action_ids_cb = {} 307 self.current_action_ids_cb = {}
308 308
309 timestamp = extra.get('archive') 309 timestamp = extra.get('archive')
310 if type_ == C.MESS_TYPE_INFO: 310 if type_ == C.MESS_TYPE_INFO:
311 self.chat_wins[win.bare].printInfo( msg, timestamp = float(timestamp) if timestamp else '') 311 self.chat_wins[win.bare].printInfo(msg, timestamp=float(timestamp) if timestamp else None)
312 else: 312 else:
313 self.chat_wins[win.bare].printMessage(from_jid, msg, profile, float(timestamp) if timestamp else '') 313 self.chat_wins[win.bare].printMessage(from_jid, msg, profile, float(timestamp) if timestamp else None)
314 314
315 def sendMessage(self, to_jid, message, subject='', mess_type="auto", extra={}, callback=None, errback=None, profile_key="@NONE@"): 315 def sendMessage(self, to_jid, message, subject='', mess_type="auto", extra={}, callback=None, errback=None, profile_key="@NONE@"):
316 if to_jid.startswith(C.PRIVATE_PREFIX): 316 if to_jid.startswith(C.PRIVATE_PREFIX):
317 to_jid = unescapePrivate(to_jid) 317 to_jid = unescapePrivate(to_jid)
318 mess_type = "chat" 318 mess_type = "chat"