# HG changeset patch # User Goffi # Date 1530131000 -7200 # Node ID a3162b29cda1e5010476b9d5e5ef43635f13c9d1 # Parent ee4d7e923e92d632c6ec19f17bcf5a2ae086e96b plugin chat: fixed AttributeError when message is receved and a corresponding ChatWidget is not created yet diff -r ee4d7e923e92 -r a3162b29cda1 cagou/plugins/plugin_wid_chat.py --- a/cagou/plugins/plugin_wid_chat.py Tue Jun 26 20:27:45 2018 +0200 +++ b/cagou/plugins/plugin_wid_chat.py Wed Jun 27 22:23:20 2018 +0200 @@ -211,6 +211,11 @@ quick_chat.QuickChat.__init__(self, host, target, type_, nick, occupants, subject, profiles=profiles) self.otr_state_encryption = OTR_STATE_UNENCRYPTED self.otr_state_trust = OTR_STATE_UNTRUSTED + # completion attributes + self._hi_comp_data = None + self._hi_comp_last = None + self._hi_comp_dropdown = DropDown() + self._hi_comp_allowed = True cagou_widget.CagouWidget.__init__(self) if type_ == C.CHAT_ONE2ONE: self.encryption_btn = EncryptionButton(self) @@ -220,11 +225,6 @@ self.host.addListener('progressFinished', self.onProgressFinished, profiles) self._waiting_pids = {} # waiting progress ids self.postInit() - # completion attribtues - self._hi_comp_data = None - self._hi_comp_last = None - self._hi_comp_dropdown = DropDown() - self._hi_comp_allowed = True def __unicode__(self): return u"Chat({})".format(self.target)