Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
ebf79d1a
by lovetox at 2022-05-09T21:07:51+02:00
4 changed files:
Changes:
| ... | ... | @@ -121,6 +121,7 @@ Gajim 1.4.0 (TBA) |
| 121 | 121 | * #10751 Inconsistent notifications behavior in 1.4 nightlies
|
| 122 | 122 | * #10773 Failure to store roster notes not reported
|
| 123 | 123 | * #10774 AppIndicator should be used for the tray icon on Wayland
|
| 124 | + * #10801 Unknown IQ errors shown in chat
|
|
| 124 | 125 | * #10813 Receiving a notification creates exception
|
| 125 | 126 | * #10814 Unable to delete custom theme
|
| 126 | 127 | * #10815 Improve Security Labels (XEP-0258) feature
|
| ... | ... | @@ -288,13 +288,6 @@ class DisplayedReceived(BaseChatMarkerEvent): |
| 288 | 288 | name: str = field(init=False, default='displayed-received')
|
| 289 | 289 | |
| 290 | 290 | |
| 291 | -@dataclass
|
|
| 292 | -class IqErrorReceived(ApplicationEvent):
|
|
| 293 | - name: str = field(init=False, default='iq-error-received')
|
|
| 294 | - account: str
|
|
| 295 | - properties: Any
|
|
| 296 | - |
|
| 297 | - |
|
| 298 | 291 | @dataclass
|
| 299 | 292 | class HttpAuth(ApplicationEvent):
|
| 300 | 293 | name: str = field(init=False, default='http-auth')
|
| ... | ... | @@ -20,7 +20,6 @@ |
| 20 | 20 | from gajim.common import app
|
| 21 | 21 | from gajim.common.events import FileRequestError
|
| 22 | 22 | from gajim.common.events import FileSendError
|
| 23 | -from gajim.common.events import IqErrorReceived
|
|
| 24 | 23 | from gajim.common.helpers import to_user_string
|
| 25 | 24 | from gajim.common.file_props import FilesProp
|
| 26 | 25 | from gajim.common.modules.base import BaseModule
|
| ... | ... | @@ -73,9 +72,9 @@ def _iq_error_received(self, _con, _stanza, properties): |
| 73 | 72 | file_props)
|
| 74 | 73 | raise nbxmpp.NodeProcessed
|
| 75 | 74 | |
| 76 | - app.ged.raise_event(
|
|
| 77 | - IqErrorReceived(account=self._account,
|
|
| 78 | - properties=properties))
|
|
| 75 | + self._log.error('Received iq error with unknown id: %s',
|
|
| 76 | + properties.error)
|
|
| 77 | + |
|
| 79 | 78 | raise nbxmpp.NodeProcessed
|
| 80 | 79 | |
| 81 | 80 | @staticmethod
|
| ... | ... | @@ -128,7 +128,6 @@ def __init__(self): |
| 128 | 128 | def _create_core_handlers_list(self) -> None:
|
| 129 | 129 | # pylint: disable=line-too-long
|
| 130 | 130 | self.handlers = {
|
| 131 | - 'iq-error-received': [self.handle_event_iq_error],
|
|
| 132 | 131 | 'signed-in': [self.handle_event_signed_in],
|
| 133 | 132 | 'presence-received': [self.handle_event_presence],
|
| 134 | 133 | 'message-sent': [self.handle_event_msgsent],
|
| ... | ... | @@ -154,12 +153,6 @@ def _register_core_handlers(self) -> None: |
| 154 | 153 | prio,
|
| 155 | 154 | event_handler)
|
| 156 | 155 | |
| 157 | - @staticmethod
|
|
| 158 | - def handle_event_iq_error(event):
|
|
| 159 | - ctrl = app.window.get_control(event.account, event.properties.jid.bare)
|
|
| 160 | - if ctrl and ctrl.is_groupchat:
|
|
| 161 | - ctrl.add_info_message(f'Error: {event.properties.error}')
|
|
| 162 | - |
|
| 163 | 156 | @staticmethod
|
| 164 | 157 | def handle_event_signed_in(event):
|
| 165 | 158 | """
|