summaryrefslogtreecommitdiff
path: root/poezio/core/handlers.py
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/core/handlers.py')
-rw-r--r--poezio/core/handlers.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py
index 25639eed..980c5822 100644
--- a/poezio/core/handlers.py
+++ b/poezio/core/handlers.py
@@ -3,7 +3,6 @@ XMPP-related handlers for the Core class
"""
import logging
-log = logging.getLogger(__name__)
from typing import Optional
@@ -30,7 +29,7 @@ from poezio import fixes
from poezio import tabs
from poezio import xhtml
from poezio import multiuserchat as muc
-from poezio.common import safeJID, get_error_message
+from poezio.common import get_error_message
from poezio.config import config, get_image_cache
from poezio.core.structs import Status
from poezio.contact import Resource
@@ -58,6 +57,8 @@ try:
except ImportError:
PYGMENTS = False
+log = logging.getLogger(__name__)
+
CERT_WARNING_TEXT = """
WARNING: CERTIFICATE FOR %s CHANGED
@@ -249,7 +250,10 @@ class HandlerCore:
"""
Direct invitation received
"""
- room = safeJID(message['groupchat_invite']['jid'])
+ try:
+ room = JID(message['groupchat_invite']['jid'])
+ except InvalidJID:
+ return
if room.bare in self.core.pending_invites:
return