gajim: update control.contact when we get a message from another...

2015-07-15 Thread Gajim
changeset 8b1276a8a6c3 in /home/hg/repos/gajim

author: Yann Leboulanger 
branches: 
details:http://hg.gajim.org/gajim?cmd=changeset;node=8b1276a8a6c3
description: update control.contact when we get a message from another 
resource. Fixes #7919

diffstat:

 src/session.py |  10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 17a957a2f2b9 -r 8b1276a8a6c3 src/session.py
--- a/src/session.pyTue May 12 09:41:58 2015 +0200
+++ b/src/session.pySun May 17 15:40:42 2015 +0200
@@ -65,10 +65,14 @@
 """
 if obj.session != self:
 return
+contact = gajim.contacts.get_contact(self.conn.name, obj.jid,
+obj.resource)
 if self.resource != obj.resource:
 self.resource = obj.resource
-if self.control and self.control.resource:
-self.control.change_resource(self.resource)
+if self.control:
+self.control.contact = contact
+if self.control.resource:
+self.control.change_resource(self.resource)
 
 if obj.mtype == 'chat':
 if not obj.stanza.getTag('body') and obj.chatstate is None:
@@ -114,8 +118,6 @@
 obj.mtype = 'pm'
 
 # Handle chat states
-contact = gajim.contacts.get_contact(self.conn.name, obj.jid,
-obj.resource)
 if contact and (not obj.forwarded or not obj.sent):
 if self.control and self.control.type_id == \
 message_control.TYPE_CHAT:
___
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits


gajim: update control.contact when we get a message from another...

2015-05-17 Thread Gajim
changeset a6560ca0a485 in /home/hg/repos/gajim

author: Yann Leboulanger 
branches: gajim_0.16
details:http://hg.gajim.org/gajim?cmd=changeset;node=a6560ca0a485
description: update control.contact when we get a message from another 
resource. Fixes #7919

diffstat:

 src/session.py |  10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 98d3fa740273 -r a6560ca0a485 src/session.py
--- a/src/session.pyTue May 12 09:41:58 2015 +0200
+++ b/src/session.pySun May 17 15:40:42 2015 +0200
@@ -65,10 +65,14 @@
 """
 if obj.session != self:
 return
+contact = gajim.contacts.get_contact(self.conn.name, obj.jid,
+obj.resource)
 if self.resource != obj.resource:
 self.resource = obj.resource
-if self.control and self.control.resource:
-self.control.change_resource(self.resource)
+if self.control:
+self.control.contact = contact
+if self.control.resource:
+self.control.change_resource(self.resource)
 
 if obj.mtype == 'chat':
 if not obj.stanza.getTag('body') and obj.chatstate is None:
@@ -114,8 +118,6 @@
 obj.mtype = 'pm'
 
 # Handle chat states
-contact = gajim.contacts.get_contact(self.conn.name, obj.jid,
-obj.resource)
 if contact and (not obj.forwarded or not obj.sent):
 if self.control and self.control.type_id == \
 message_control.TYPE_CHAT:
___
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits