diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2011-05-21 00:36:10 +0400 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2011-05-21 00:36:10 +0400 |
commit | 8896e33d65a12c41c1046678c157796353f50fe4 (patch) | |
tree | 7319a1aadd39d876bb1018ba0ad05f1695113e30 | |
parent | 03312a521d3c672b9c4d01af5c427e0e00052cd3 (diff) |
send message to the correct jid
-rw-r--r-- | src/chat_control.py | 15 | ||||
-rw-r--r-- | src/message_control.py | 3 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/chat_control.py b/src/chat_control.py index a3ebd792a..ead468ba9 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -864,10 +864,11 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools): label = self.get_seclabel() gajim.nec.push_outgoing_event(MessageOutgoingEvent(None, - account=self.account, message=message, keyID=keyID, type_=type_, - chatstate=chatstate, msg_id=msg_id, composing_xep=composing_xep, - resource=resource, user_nick=self.user_nick, xhtml=xhtml, - label=label, callback=callback, callback_args= callback_args)) + account=self.account, jid=self.contact.jid, message=message, + keyID=keyID, type_=type_, chatstate=chatstate, msg_id=msg_id, + composing_xep=composing_xep, resource=resource, + user_nick=self.user_nick, xhtml=xhtml, label=label, + callback=callback, callback_args= callback_args)) # Record the history of sent messages self.save_message(message, 'sent') @@ -2629,13 +2630,13 @@ class ChatControl(ChatControlBase): if contact.our_chatstate == 'inactive' and state == 'composing': # go active before gajim.nec.push_outgoing_event(MessageOutgoingEvent(None, - account=self.account, chatstate='active')) + account=self.account, jid=self.contact.jid, chatstate='active')) contact.our_chatstate = 'active' self.reset_kbd_mouse_timeout_vars() gajim.nec.push_outgoing_event(MessageOutgoingEvent(None, - account=self.account, chatstate=state, msg_id=contact.msg_id, - composing_xep=contact.composing_xep)) + account=self.account, jid=self.contact.jid, chatstate=state, + msg_id=contact.msg_id, composing_xep=contact.composing_xep)) contact.our_chatstate = state if contact.our_chatstate == 'active': diff --git a/src/message_control.py b/src/message_control.py index 14efb42da..d265e5768 100644 --- a/src/message_control.py +++ b/src/message_control.py @@ -224,8 +224,9 @@ class MessageControl(object): # Doesn't return None if error if obj.account != self.account: return + if self.contact.jid != obj.jid: + return - obj.jid = self.contact.jid obj.message = helpers.remove_invalid_xml_chars(obj.message) obj.original_message = obj.message |