'Remove a JID\'s whitelisted status and unsubscribe if a
subscription exists.'

def remove(self):

    if self['to']:
        p = self.xmpp.Presence()
        p['to'] = self.jid
        p['type'] = 'unsubscribe'
        if self.xmpp.is_component:
            p['from'] = self.owner
        p.send()
        self['to'] = False
    self['whitelisted'] = False
    self.save()
