From 11d246901107b671c5ddb7ceacc949d94f25f3d7 Mon Sep 17 00:00:00 2001 From: wurstsalat Date: Mon, 23 Aug 2021 23:28:13 +0200 Subject: Events: Remove obsolete GcInvitationEvent --- gajim/gtk/notification_manager.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'gajim/gtk/notification_manager.py') 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: -- cgit v1.2.3