Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2022-05-09 22:07:51 +0300
committerlovetox <philipp@hoerist.com>2022-05-09 22:07:51 +0300
commitebf79d1a135377e3ef66138bcbe02fb733db4fe1 (patch)
tree7a14ae3072db3d73ab8fdd38bbcecb4ba47ccc77
parentf787e807bb01ddb2481c773f3bf57dc22fa6fdc8 (diff)
fix: Don’t show unknown IQ errors
Seems some buggy server send IQ error with an unknown id. Log the error but dont bother the user with it. Fixes #10801
-rw-r--r--ChangeLog1
-rw-r--r--gajim/common/events.py7
-rw-r--r--gajim/common/modules/iq.py7
-rw-r--r--gajim/gui_interface.py7
4 files changed, 4 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 12dd80993..b7b215ab0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -121,6 +121,7 @@ Gajim 1.4.0 (TBA)
* #10751 Inconsistent notifications behavior in 1.4 nightlies
* #10773 Failure to store roster notes not reported
* #10774 AppIndicator should be used for the tray icon on Wayland
+ * #10801 Unknown IQ errors shown in chat
* #10813 Receiving a notification creates exception
* #10814 Unable to delete custom theme
* #10815 Improve Security Labels (XEP-0258) feature
diff --git a/gajim/common/events.py b/gajim/common/events.py
index 5c54a762a..8c1e8e91f 100644
--- a/gajim/common/events.py
+++ b/gajim/common/events.py
@@ -289,13 +289,6 @@ class DisplayedReceived(BaseChatMarkerEvent):
@dataclass
-class IqErrorReceived(ApplicationEvent):
- name: str = field(init=False, default='iq-error-received')
- account: str
- properties: Any
-
-
-@dataclass
class HttpAuth(ApplicationEvent):
name: str = field(init=False, default='http-auth')
client: 'Client'
diff --git a/gajim/common/modules/iq.py b/gajim/common/modules/iq.py
index 5b0a704ec..22c272ad9 100644
--- a/gajim/common/modules/iq.py
+++ b/gajim/common/modules/iq.py
@@ -20,7 +20,6 @@ from nbxmpp.structs import StanzaHandler
from gajim.common import app
from gajim.common.events import FileRequestError
from gajim.common.events import FileSendError
-from gajim.common.events import IqErrorReceived
from gajim.common.helpers import to_user_string
from gajim.common.file_props import FilesProp
from gajim.common.modules.base import BaseModule
@@ -73,9 +72,9 @@ class Iq(BaseModule):
file_props)
raise nbxmpp.NodeProcessed
- app.ged.raise_event(
- IqErrorReceived(account=self._account,
- properties=properties))
+ self._log.error('Received iq error with unknown id: %s',
+ properties.error)
+
raise nbxmpp.NodeProcessed
@staticmethod
diff --git a/gajim/gui_interface.py b/gajim/gui_interface.py
index 372c3e184..3fb9a2c88 100644
--- a/gajim/gui_interface.py
+++ b/gajim/gui_interface.py
@@ -128,7 +128,6 @@ class Interface:
def _create_core_handlers_list(self) -> None:
# pylint: disable=line-too-long
self.handlers = {
- 'iq-error-received': [self.handle_event_iq_error],
'signed-in': [self.handle_event_signed_in],
'presence-received': [self.handle_event_presence],
'message-sent': [self.handle_event_msgsent],
@@ -155,12 +154,6 @@ class Interface:
event_handler)
@staticmethod
- def handle_event_iq_error(event):
- ctrl = app.window.get_control(event.account, event.properties.jid.bare)
- if ctrl and ctrl.is_groupchat:
- ctrl.add_info_message(f'Error: {event.properties.error}')
-
- @staticmethod
def handle_event_signed_in(event):
"""
SIGNED_IN event is emitted when we sign in, so handle it