Commit ebf79d1a authored by Philipp Hörist's avatar Philipp Hörist
Browse files

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
parent f787e807
......@@ -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
......
......@@ -288,13 +288,6 @@ class DisplayedReceived(BaseChatMarkerEvent):
name: str = field(init=False, default='displayed-received')
@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')
......
......@@ -20,7 +20,6 @@
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 @@ def _iq_error_received(self, _con, _stanza, properties):
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
......
......@@ -128,7 +128,6 @@ def __init__(self):
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],
......@@ -154,12 +153,6 @@ def _register_core_handlers(self) -> None:
prio,
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):
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment