changeset 8d65c137c447 in /home/hg/repos/gajim

details:http://hg.gajim.org/gajim?cmd=changeset;node=8d65c137c447
description: send message to the correct jid

diffstat:

 src/chat_control.py    |  15 ++++++++-------
 src/message_control.py |   3 ++-
 2 files changed, 10 insertions(+), 8 deletions(-)

diffs (50 lines):

diff -r 48f1b8de4799 -r 8d65c137c447 src/chat_control.py
--- a/src/chat_control.py       Fri May 20 17:24:53 2011 +0200
+++ b/src/chat_control.py       Fri May 20 22:36:10 2011 +0200
@@ -864,10 +864,11 @@
         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 @@
         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 -r 48f1b8de4799 -r 8d65c137c447 src/message_control.py
--- a/src/message_control.py    Fri May 20 17:24:53 2011 +0200
+++ b/src/message_control.py    Fri May 20 22:36:10 2011 +0200
@@ -224,8 +224,9 @@
         # 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
 
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to