From 2bdb296a66147ed4e52be52d77d434e12c57a6db Mon Sep 17 00:00:00 2001
From: lovetox <philipp@hoerist.com>
Date: Sat, 28 May 2022 07:53:18 +0200
Subject: [PATCH] fix: Iq: Remove condition for not existing attribute

---
 gajim/common/modules/iq.py | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/gajim/common/modules/iq.py b/gajim/common/modules/iq.py
index 4cffc02b8c..b0bbed8921 100644
--- a/gajim/common/modules/iq.py
+++ b/gajim/common/modules/iq.py
@@ -68,18 +68,17 @@ def _iq_error_received(self,
                 raise nbxmpp.NodeProcessed
 
         if properties.error.condition == 'item-not-found':
-            if not properties.is_pubsub:
-                sid = self._get_sid(properties.id)
-                file_props = FilesProp.getFileProp(self._account, sid)
-                if file_props:
-                    app.ged.raise_event(
-                        FileSendError(account=self._account,
-                                      jid=str(properties.jid),
-                                      file_props=file_props,
-                                      error_msg=''))
-                    self._con.get_module('Bytestream').disconnect_transfer(
-                        file_props)
-                    raise nbxmpp.NodeProcessed
+            sid = self._get_sid(properties.id)
+            file_props = FilesProp.getFileProp(self._account, sid)
+            if file_props:
+                app.ged.raise_event(
+                    FileSendError(account=self._account,
+                                  jid=str(properties.jid),
+                                  file_props=file_props,
+                                  error_msg=''))
+                self._con.get_module('Bytestream').disconnect_transfer(
+                    file_props)
+                raise nbxmpp.NodeProcessed
 
         self._log.error('Received iq error with unknown id: %s',
                         properties.error)
-- 
GitLab