diff --git a/src/chat_control.py b/src/chat_control.py index b7a919f31..e2d6f6d5c 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -2365,10 +2365,10 @@ class ChatControl(ChatControlBase): gobject.source_remove(self.possible_inactive_timeout_id) self._schedule_activity_timers() - def _on_sent(msg, contact, message, encrypted, xhtml, label, old_txt): - id_ = msg.getID() - if contact.supports(NS_RECEIPTS) and gajim.config.get_per('accounts', - self.account, 'request_receipt'): + def _on_sent(msg_stanza, message, encrypted, xhtml, label, old_txt): + id_ = msg_stanza.getID() + if self.contact.supports(NS_RECEIPTS) and gajim.config.get_per( + 'accounts', self.account, 'request_receipt'): xep0184_id = id_ else: xep0184_id = None @@ -2390,8 +2390,8 @@ class ChatControl(ChatControlBase): ChatControlBase.send_message(self, message, keyID, type_='chat', chatstate=chatstate_to_send, xhtml=xhtml, callback=_on_sent, - callback_args=[contact, message, encrypted, xhtml, - self.get_seclabel(), self.last_sent_txt], process_commands=process_commands, + callback_args=[message, encrypted, xhtml, self.get_seclabel(), + self.last_sent_txt], process_commands=process_commands, attention=attention) def check_for_possible_paused_chatstate(self, arg):