diff options
author | wurstsalat <mailtrash@posteo.de> | 2021-08-24 00:28:13 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2021-12-03 00:19:17 +0300 |
commit | 11d246901107b671c5ddb7ceacc949d94f25f3d7 (patch) | |
tree | ca22c7f6d1be75ff1ebd7e388e6d8e574310bf7f /gajim/gtk/notification_manager.py | |
parent | 12be6737ceceb8bd088e4ba05fc3559f4f7b7055 (diff) |
Events: Remove obsolete GcInvitationEvent
Diffstat (limited to 'gajim/gtk/notification_manager.py')
-rw-r--r-- | gajim/gtk/notification_manager.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gajim/gtk/notification_manager.py b/gajim/gtk/notification_manager.py index cbd23a43d..182f28c49 100644 --- a/gajim/gtk/notification_manager.py +++ b/gajim/gtk/notification_manager.py @@ -180,6 +180,26 @@ class NotificationManager(Gtk.ListBox): if row is None: self.add(InvitationReceivedRow(self._account, event)) + if allow_showing_notification(self._account): + if get_muc_context(event.muc) == 'public': + jid = event.from_ + else: + jid = event.from_.bare + contact = self._client.get_module('Contacts').get_contact(jid) + event_type = _('Group Chat Invitation') + text = _('%(contact)s invited you to %(chat)s') % { + 'contact': contact.name, + 'chat': event.info.muc_name} + app.notification.popup( + event_type, + str(jid), + self._account, + 'gc-invitation', + 'gajim-gc_invitation', + event_type, + text, + room_jid=event.muc) + def add_invitation_declined(self, event): row = self._get_notification_row(event.muc) if row is None: |