Commit d0eb137a authored by Daniel Brötzmann's avatar Daniel Brötzmann

Suppress subscription request and window if unnecessary

parent f3e02187
Pipeline #4220 passed with stages
in 2 minutes and 23 seconds
......@@ -367,8 +367,16 @@ class Interface:
def handle_event_subscribe_presence(self, obj):
#('SUBSCRIBE', account, (jid, text, user_nick)) user_nick is JEP-0172
# ('SUBSCRIBE', account, (jid, text, user_nick)) user_nick is XEP-0172
account =
jid = obj.jid
# Check if contact is already in roster and subscribed (both or to)
if obj.conn.get_module('Roster').get_item(jid):
contact = app.contacts.get_first_contact_from_jid(account, jid)
if contact.sub in ('both', 'to'):
# No need to notify or show SubscriptionRequestWindow again
if helpers.allow_popup_window(account) or not self.systray_enabled:
if obj.jid in self.instances[account]['sub_request']:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment