From 1554d9e53a76490534797e1df53b991953e85249 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Sat, 14 Mar 2020 15:33:57 +0300 Subject: [PATCH] Fixed bug with sending faux offline inlines --- toxygen/profile.py | 7 ++++--- toxygen/util.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/toxygen/profile.py b/toxygen/profile.py index 47f15f2..8cc6c6e 100644 --- a/toxygen/profile.py +++ b/toxygen/profile.py @@ -1099,10 +1099,11 @@ class Profile(basecontact.BaseContact, Singleton): file_name, friend.number, st.get_file_number()) - item = self.create_file_transfer_item(tm) friend.append_message(tm) - st.set_state_changed_handler(item.update_transfer_state) - self._messages.scrollToBottom() + if friend_number == self.get_active_number(): + item = self.create_file_transfer_item(tm) + st.set_state_changed_handler(item.update_transfer_state) + self._messages.scrollToBottom() def send_file(self, path, number=None, is_resend=False, file_id=None): """ diff --git a/toxygen/util.py b/toxygen/util.py index d862d56..73959c6 100644 --- a/toxygen/util.py +++ b/toxygen/util.py @@ -5,7 +5,7 @@ import sys import re -program_version = '0.4.2' +program_version = '0.4.3' def cached(func):