diff --git a/src/dialogs.py b/src/dialogs.py
index c761e37cc54ec5616a02052f1ad7b377028b9784..6dec2e573b732e7983a00b2f2b4f628d0292022c 100644
--- a/src/dialogs.py
+++ b/src/dialogs.py
@@ -4482,7 +4482,7 @@ class InvitationReceivedDialog:
             sectext = _('$Contact has invited you to group chat %(room_jid)s')\
                 % {'room_jid': room_jid}
         contact = gajim.contacts.get_first_contact_from_jid(account, jid)
-        contact_text = contact and contact.name or contact_jid
+        contact_text = contact and contact.name or jid
         sectext = sectext.replace('$Contact', contact_text)
 
         if comment: # only if not None and not ''