def actor_remove_contact(self, from_jid, nick): jid_ref = api.actor_lookup_im(api.ROOT, from_jid.base()) if not jid_ref: raise exception.ValidationError( "You must be signed in to post, please SIGN IN") nick = clean.nick(nick) try: api.actor_remove_contact(jid_ref, jid_ref.nick, nick) self.send_message((from_jid, ), "%s stopped following %s" % (jid_ref.nick, nick)) except: self.send_message((from_jid, ), "Leave FAILED: %s" % nick)
def actor_remove_contact(self, sender, nick): sender_ref = api.actor_lookup_mobile(api.ROOT, sender) if not sender_ref: raise exception.ValidationError(HELP_SIGN_IN) clean_nick = clean.nick(nick) try: api.actor_remove_contact(sender_ref, sender_ref.nick, clean_nick) self.send_message( (sender, ), "%s stopped following %s" % (sender_ref.dispaly_nick(), nick)) except: self.send_message((sender, ), "Failed to stop following %s" % nick)
def actor_remove_contact(self, from_jid, nick): jid_ref = api.actor_lookup_im(api.ROOT, from_jid.base()) if not jid_ref: raise exception.ValidationError( "You must be signed in to post, please SIGN IN") nick = clean.nick(nick) try: api.actor_remove_contact(jid_ref, jid_ref.nick, nick) self.send_message((from_jid,), "%s stopped following %s" % (jid_ref.nick, nick)) except: self.send_message((from_jid,), "Leave FAILED: %s" % nick)
def actor_remove_contact(self, sender, nick): sender_ref = api.actor_lookup_mobile(api.ROOT, sender) if not sender_ref: raise exception.ValidationError(HELP_SIGN_IN) clean_nick = clean.nick(nick) try: api.actor_remove_contact(sender_ref, sender_ref.nick, clean_nick) self.send_message((sender,), "%s stopped following %s" % (sender_ref.dispaly_nick(), nick)) except: self.send_message((sender,), "Failed to stop following %s" % nick)