This commit is contained in:
mathieui 2011-11-15 19:15:06 +01:00
parent 68aa832a49
commit e8837e252f

View file

@ -1585,9 +1585,17 @@ class RosterInfoTab(Tab):
return
else:
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')
try:
if self.core.xmpp.update_roster(jid, subscription='remove'):
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):
"""