comparison sat_frontends/quick_frontend/quick_chat.py @ 2632:96911768b0f3

quick_frontend (chat): create target in cache if it is not found, avoiding an exception
author Goffi <goffi@goffi.org>
date Mon, 02 Jul 2018 08:54:57 +0200
parents 56f94936df1e
children e35a265ec174
comparison
equal deleted inserted replaced
2631:a381186e2398 2632:96911768b0f3
498 log_msg += _(u" ({} messages)".format(size)) 498 log_msg += _(u" ({} messages)".format(size))
499 log.debug(log_msg) 499 log.debug(log_msg)
500 500
501 if self.type == C.CHAT_ONE2ONE: 501 if self.type == C.CHAT_ONE2ONE:
502 special = self.host.contact_lists[self.profile].getCache( 502 special = self.host.contact_lists[self.profile].getCache(
503 self.target, C.CONTACT_SPECIAL 503 self.target, C.CONTACT_SPECIAL, create_if_not_found=True
504 ) 504 )
505 if special == C.CONTACT_SPECIAL_GROUP: 505 if special == C.CONTACT_SPECIAL_GROUP:
506 # we have a private conversation 506 # we have a private conversation
507 # so we need full jid for the history 507 # so we need full jid for the history
508 # (else we would get history from group itself) 508 # (else we would get history from group itself)