diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py
index 6393701992f3825510cdc9385fb5915e487ca1f4..bd962cdfefea1385744fe58f3f6c2aa49ab06068 100644
--- a/src/common/connection_handlers.py
+++ b/src/common/connection_handlers.py
@@ -1043,6 +1043,10 @@ class ConnectionHandlersBase:
             gajim.nec.push_incoming_event(GcInvitationReceivedEvent(None,
                 conn=self, msg_obj=obj))
             return True
+        elif obj.decline_tag is not None:
+            gajim.nec.push_incoming_event(GcDeclineReceivedEvent(None,
+                conn=self, msg_obj=obj))
+            return True
 
     # process and dispatch an error message
     def dispatch_error_message(self, msg, msgtxt, session, frm, tim):
diff --git a/src/gui_interface.py b/src/gui_interface.py
index a64cb82d959f4b6f519a00be2dcbe1960c67bf51..b6c8f7ef470eda9a2e883da87a9a236e48bead9e 100644
--- a/src/gui_interface.py
+++ b/src/gui_interface.py
@@ -625,7 +625,6 @@ class Interface:
 
     def handle_event_gc_invitation(self, obj):
         #('GC_INVITATION', (room_jid, jid_from, reason, password, is_continued))
-        jid = gajim.get_jid_without_resource(obj.jid_from)
         account = obj.conn.name
         if helpers.allow_popup_window(account) or not self.systray_enabled:
             dialogs.InvitationReceivedDialog(account, obj.room_jid,