diff --git a/src/filetransfers_window.py b/src/filetransfers_window.py index bc96b43cd..efe7c787f 100644 --- a/src/filetransfers_window.py +++ b/src/filetransfers_window.py @@ -639,7 +639,9 @@ class FileTransfersWindow: status = 'stop' self.model.set(iter_, 0, self.get_icon(status)) if transfered_size == full_size: - if file_props['type'] == 'r': + # If we are receiver and this is a jingle session + if file_props['type'] == 'r' and 'session-sid' in file_props: + # Show that we are computing the hash self.set_status(typ, sid, 'computing') else: self.set_status(typ, sid, 'ok') diff --git a/src/gui_interface.py b/src/gui_interface.py index d16b4f7e6..a27c11914 100644 --- a/src/gui_interface.py +++ b/src/gui_interface.py @@ -34,7 +34,6 @@ ## You should have received a copy of the GNU General Public License ## along with Gajim. If not, see . ## - import os import sys import re @@ -954,11 +953,13 @@ class Interface: return if file_props['type'] == 'r': # we receive a file - jid = unicode(file_props['sender']) - # Compare hashes in a new thread - self.hashThread = Thread(target=self.__compare_hashes, - args=(account, file_props)) - self.hashThread.start() + # If we have a jingle session id, it is a jingle transfer + # we compare hashes + if 'session-sid' in file_props: + # Compare hashes in a new thread + self.hashThread = Thread(target=self.__compare_hashes, + args=(account, file_props)) + self.hashThread.start() gajim.socks5queue.remove_receiver(file_props['sid'], True, True) else: # we send a file jid = unicode(file_props['receiver'])