Mercurial > libervia-backend
diff frontends/src/wix/chat.py @ 501:e9634d2e7b38
core, quick_frontend, primitivus, wix: Contacts List refactoring phase 1:
- QuickContactManagement is not used anymore and will be removed, ContactList + Core are used instead
- disconnected contacts are now displayed in Primitivus (M-d to show/hide them)
- avatars are temporary unavailable in wix
- new bridge method: getContactsFromGroup
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 25 Sep 2012 00:58:34 +0200 |
parents | 2a072735e459 |
children | f98bef71a918 |
line wrap: on
line diff
--- a/frontends/src/wix/chat.py Wed Sep 05 00:19:32 2012 +0200 +++ b/frontends/src/wix/chat.py Tue Sep 25 00:58:34 2012 +0200 @@ -258,7 +258,12 @@ filename = wx.FileSelector(_("Choose a file to send"), flags = wx.FD_FILE_MUST_EXIST) if filename: debug(_("filename: %s"),filename) - full_jid = self.host.CM.get_full(self.target) + #FIXME: check last_resource: what if self.target.resource exists ? + last_resource = self.host.bridge.getLastResource(unicode(self.target.short), self.host.profile) + if last_resource: + full_jid = JID("%s/%s" % (self.target.short, last_resource)) + else: + full_jid = self.target id = self.host.bridge.sendFile(full_jid, filename, {}, self.host.profile) self.host.waitProgress(id, _("File Transfer"), _("Copying %s") % os.path.basename(filename))