diff frontends/src/primitivus/chat.py @ 688:f7878ad3c846

tools: renamed tools.jid.JID attribute "short" to "bare"
author souliane <souliane@mailoo.org>
date Tue, 29 Oct 2013 16:26:55 +0100
parents a630b94280d5
children 7b72d5c30ebc
line wrap: on
line diff
--- a/frontends/src/primitivus/chat.py	Mon Oct 28 19:04:49 2013 +0100
+++ b/frontends/src/primitivus/chat.py	Tue Oct 29 16:26:55 2013 +0100
@@ -190,7 +190,7 @@
             #We ignore click on our own nick
             return
         #we have a click on a nick, we add the private conversation to the contact_list
-        full_jid = JID("%s/%s" % (self.target.short, nick))
+        full_jid = JID("%s/%s" % (self.target.bare, nick))
         new_jid = escapePrivate(full_jid)
         if new_jid not in self.host.contact_list:
             self.host.contact_list.add(new_jid)
@@ -340,9 +340,9 @@
     def onFileSelected(self, filepath):
         self.host.removePopUp()
         #FIXME: check last_resource: what if self.target.resource exists ?
-        last_resource = self.host.bridge.getLastResource(unicode(self.target.short), self.host.profile)
+        last_resource = self.host.bridge.getLastResource(unicode(self.target.bare), self.host.profile)
         if last_resource:
-            full_jid = JID("%s/%s" % (self.target.short, last_resource))
+            full_jid = JID("%s/%s" % (self.target.bare, last_resource))
         else:
             full_jid = self.target
         progress_id = self.host.bridge.sendFile(full_jid, filepath, {}, self.host.profile)