Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwurstsalat <mailtrash@posteo.de>2021-08-24 00:12:15 +0300
committerlovetox <philipp@hoerist.com>2021-12-03 00:19:16 +0300
commit12be6737ceceb8bd088e4ba05fc3559f4f7b7055 (patch)
tree9cb104f16b3f60a38753754db414d6f11985a587 /gajim/gtk/notification_manager.py
parenta73cab0e45c33d5847cdcd7ef0679411b04d1a90 (diff)
Events: Remove obsolete SubscriptionRequestEvent
Diffstat (limited to 'gajim/gtk/notification_manager.py')
-rw-r--r--gajim/gtk/notification_manager.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/gajim/gtk/notification_manager.py b/gajim/gtk/notification_manager.py
index 0d9ea9275..cbd23a43d 100644
--- a/gajim/gtk/notification_manager.py
+++ b/gajim/gtk/notification_manager.py
@@ -104,7 +104,6 @@ class NotificationManager(Gtk.ListBox):
def _on_subscription_block(self, _action, param):
jid = param.get_string()
- app.events.remove_events(self._account, jid)
self._deny_request(jid)
self._client.get_module('Blocking').block([jid])
row = self._get_notification_row(jid)
@@ -112,7 +111,6 @@ class NotificationManager(Gtk.ListBox):
def _on_subscription_report(self, _action, param):
jid = param.get_string()
- app.events.remove_events(self._account, jid)
self._deny_request(jid)
self._client.get_module('Blocking').block([jid], report='spam')
row = self._get_notification_row(jid)
@@ -138,6 +136,21 @@ class NotificationManager(Gtk.ListBox):
if row is None:
self.add(SubscriptionRequestRow(
self._account, event.jid, event.status, event.user_nick))
+
+ if allow_showing_notification(self._account):
+ event_type = _('Subscription Request')
+ contact = self._client.get_module('Contacts').get_contact(
+ event.jid)
+ text = _('%s asks you to share your status') % contact.name
+ app.notification.popup(
+ event_type,
+ event.jid,
+ self._account,
+ 'subscription-request',
+ 'gajim-subscription_request',
+ event_type,
+ text)
+
elif row.type == 'unsubscribed':
self.remove(row)