diff options
Diffstat (limited to 'gajim/gtk/menus.py')
-rw-r--r-- | gajim/gtk/menus.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gajim/gtk/menus.py b/gajim/gtk/menus.py index 15a7a7e48..8b22d43b8 100644 --- a/gajim/gtk/menus.py +++ b/gajim/gtk/menus.py @@ -465,6 +465,10 @@ def get_groupchat_admin_menu(self_contact: types.GroupchatParticipant, menu = GajimMenu() + if contact.real_jid is None: + menu.add_item(_('Not Available'), 'dummy', None) + return menu + action = 'win.muc-change-affiliation' if is_affiliation_change_allowed(self_contact, contact, 'owner'): @@ -499,6 +503,10 @@ def get_groupchat_mod_menu(self_contact: types.GroupchatParticipant, menu = GajimMenu() + if not contact.is_available: + menu.add_item(_('Not Available'), 'dummy', None) + return menu + if is_role_change_allowed(self_contact, contact): value = f'"{contact.name}"' menu.add_item(_('Kickā¦'), 'win.muc-kick', value) @@ -519,10 +527,10 @@ def get_groupchat_mod_menu(self_contact: types.GroupchatParticipant, return menu -def get_groupchat_roster_menu(account: str, - self_contact: types.GroupchatParticipant, - contact: types.GroupchatParticipant - ) -> GajimMenu: +def get_groupchat_participant_menu(account: str, + self_contact: types.GroupchatParticipant, + contact: types.GroupchatParticipant + ) -> GajimMenu: value = f'"{contact.name}"' |