Fixes #2292
This commit is contained in:
parent
68aa832a49
commit
e8837e252f
1 changed files with 10 additions and 2 deletions
|
@ -1585,9 +1585,17 @@ class RosterInfoTab(Tab):
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
jid = JID(args[0]).bare
|
jid = JID(args[0]).bare
|
||||||
|
if not jid in [contact.bare_jid for contact in roster.get_contacts()]:
|
||||||
|
self.core.information('No subscription to deny')
|
||||||
|
return
|
||||||
|
|
||||||
self.core.xmpp.sendPresence(pto=jid, ptype='unsubscribed')
|
self.core.xmpp.sendPresence(pto=jid, ptype='unsubscribed')
|
||||||
|
try:
|
||||||
if self.core.xmpp.update_roster(jid, subscription='remove'):
|
if self.core.xmpp.update_roster(jid, subscription='remove'):
|
||||||
roster.remove_contact(jid)
|
roster.remove_contact(jid)
|
||||||
|
except Exception as e:
|
||||||
|
import traceback
|
||||||
|
log.debug(_('Traceback when removing %s from the roster:\n')+traceback.format_exc())
|
||||||
|
|
||||||
def command_add(self, args):
|
def command_add(self, args):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue