Commit 8896e33d authored by Yann Leboulanger's avatar Yann Leboulanger

send message to the correct jid

parent 03312a52
...@@ -864,10 +864,11 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools): ...@@ -864,10 +864,11 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
label = self.get_seclabel() label = self.get_seclabel()
gajim.nec.push_outgoing_event(MessageOutgoingEvent(None, gajim.nec.push_outgoing_event(MessageOutgoingEvent(None,
account=self.account, message=message, keyID=keyID, type_=type_, account=self.account, jid=self.contact.jid, message=message,
chatstate=chatstate, msg_id=msg_id, composing_xep=composing_xep, keyID=keyID, type_=type_, chatstate=chatstate, msg_id=msg_id,
resource=resource, user_nick=self.user_nick, xhtml=xhtml, composing_xep=composing_xep, resource=resource,
label=label, callback=callback, callback_args= callback_args)) user_nick=self.user_nick, xhtml=xhtml, label=label,
callback=callback, callback_args= callback_args))
# Record the history of sent messages # Record the history of sent messages
self.save_message(message, 'sent') self.save_message(message, 'sent')
...@@ -2629,13 +2630,13 @@ class ChatControl(ChatControlBase): ...@@ -2629,13 +2630,13 @@ class ChatControl(ChatControlBase):
if contact.our_chatstate == 'inactive' and state == 'composing': if contact.our_chatstate == 'inactive' and state == 'composing':
# go active before # go active before
gajim.nec.push_outgoing_event(MessageOutgoingEvent(None, 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' contact.our_chatstate = 'active'
self.reset_kbd_mouse_timeout_vars() self.reset_kbd_mouse_timeout_vars()
gajim.nec.push_outgoing_event(MessageOutgoingEvent(None, gajim.nec.push_outgoing_event(MessageOutgoingEvent(None,
account=self.account, chatstate=state, msg_id=contact.msg_id, account=self.account, jid=self.contact.jid, chatstate=state,
composing_xep=contact.composing_xep)) msg_id=contact.msg_id, composing_xep=contact.composing_xep))
contact.our_chatstate = state contact.our_chatstate = state
if contact.our_chatstate == 'active': if contact.our_chatstate == 'active':
......
...@@ -224,8 +224,9 @@ class MessageControl(object): ...@@ -224,8 +224,9 @@ class MessageControl(object):
# Doesn't return None if error # Doesn't return None if error
if obj.account != self.account: if obj.account != self.account:
return return
if self.contact.jid != obj.jid:
return
obj.jid = self.contact.jid
obj.message = helpers.remove_invalid_xml_chars(obj.message) obj.message = helpers.remove_invalid_xml_chars(obj.message)
obj.original_message = obj.message obj.original_message = obj.message
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment