// Unban will unban user from chat, who would have thought eh?
336989
func (b *Bot) Unban(chat *Chat, user *User) error {
	params := map[string]string{
		"chat_id": chat.Recipient(),
		"user_id": user.Recipient(),
	}

	respJSON, err := b.Raw("unbanChatMember", params)
	if err != nil {
		return err
	}

	return extractOkResponse(respJSON)
}
694455
func (s *SubSocket) Unsubscribe(topic string) error {
	return s.sock.SetOption(mangos.OptionUnsubscribe, topic)
}
679937
func (client *lockRESTClient) ForceUnlock(args dsync.LockArgs) (reply bool, err error) {
	return client.restCall(lockRESTMethodForceUnlock, args)
}
1020226
func (c *ChatRPC) ChatResetConversation(
	_ context.Context, _ chat1.ChatResetConversationArg) error {
	return nil
}
5989
func (rtm *Client) ChatDelete(channelID string, ts Timestamp) error {
	res := basicResponse{}
	err := NewExternalRequest().
		AsPost().
		WithScheme(APIScheme).
		WithHost(APIEndpoint).
		WithPath("api/chat.delete").
		WithPostData("token", rtm.Token).
		WithPostData("channel", channelID).
		WithPostData("ts", ts.String()).
		JSON(&res)

	if err != nil {
		return err
	}

	if !IsEmpty(res.Error) {
		return exception.New(res.Error)
	}
	if !res.OK {
		return exception.New("slack response `ok` is false.")
	}

	return nil
}
28951
func handleUnregister(proxy *mist.Proxy, msg mist.Message) error {

	if err := defaultAuth.RemoveToken(msg.Data); err != nil {
		return err
	}

	return nil
}
904727
func (ip *Interpreter) remove(args []string) {
	ip.simpleResponder(ip.Backend.RemoveUserFromGroup(args[0], args[1]))
}
575995
func (user *User) Unfollow(board Board) error {
	if board == nil {
		return errors.New("Unable to unfollow an undefined board!")
	}

	switch board.(type) {
	case *User:
		otherUser := board.(*User)
		return Db().Where(&UserFollower{From: user.ID(), To: otherUser.ID()}).Delete(UserFollower{})

	case *Project:
		otherProj := board.(*Project)
		return Db().Where(&ProjectFollower{From: user.ID(), To: otherProj.ID()}).Delete(ProjectFollower{})

	}

	return errors.New("Invalid follower type " + reflect.TypeOf(board).String())
}
606014
func (s *userServiceImpl) ResetBan(ctx context.Context, user repository.User) error {
	user.Banned = false
	return s.ExecuteInTransaction(func() error {
		return s.Repositories().Users().Save(ctx, &user)
	})
}
1301775
func (mr *MockConnectorMockRecorder) Unsubscribe(name interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsubscribe", reflect.TypeOf((*MockConnector)(nil).Unsubscribe), name)
}
210365
func (b *Bot) Ban(chat *Chat, member *ChatMember) error {
	params := map[string]string{
		"chat_id":    chat.Recipient(),
		"user_id":    member.User.Recipient(),
		"until_date": strconv.FormatInt(member.RestrictedUntil, 10),
	}

	respJSON, err := b.Raw("kickChatMember", params)
	if err != nil {
		return err
	}

	return extractOkResponse(respJSON)
}
629796
func (c *Controller) Unsubscribe(name string) error {
	c.mu.Lock()
	defer c.mu.Unlock()
	sub, ok := c.subscriptions[name]
	if !ok {
		return fmt.Errorf("Unknown subscription '%s'", name)
	}
	msg := NewMsg(MsgCodeStop, name, sub.address)
	smsg, err := rlp.EncodeToBytes(msg)
	if err != nil {
		return err
	}
	err = c.pss.SendAsym(sub.pubkeyId, controlTopic, smsg)
	if err != nil {
		return err
	}
	delete(c.subscriptions, name)
	return nil
}
580785
func (b *BlockedEvals) UnblockQuota(quota string, index uint64) {
	// Nothing to do
	if quota == "" {
		return
	}

	b.l.Lock()

	// Do nothing if not enabled
	if !b.enabled {
		b.l.Unlock()
		return
	}

	// Store the index in which the unblock happened. We use this on subsequent
	// block calls in case the evaluation was in the scheduler when a trigger
	// occurred.
	b.unblockIndexes[quota] = index
	b.l.Unlock()

	b.capacityChangeCh <- &capacityUpdate{
		quotaChange: quota,
		index:       index,
	}
}
1056627
func (c *Client) Unregister(reg fab.Registration) {
	c.eventService.Unregister(reg)
}
1331657
func (c *Tethering) Unbind(port int) (*gcdmessage.ChromeResponse, error) {
	var v TetheringUnbindParams
	v.Port = port
	return c.UnbindWithParams(&v)
}
459736
def unban_user(self, room_id, user_id):
        
        body = {
            "user_id": user_id
        }
        return self._send("POST", "/rooms/" + room_id + "/unban", body)
1068791
func (bot *BotAPI) UnbanChatMember(config ChatMemberConfig) (APIResponse, error) {
	v := url.Values{}

	if config.SuperGroupUsername != "" {
		v.Add("chat_id", config.SuperGroupUsername)
	} else if config.ChannelUsername != "" {
		v.Add("chat_id", config.ChannelUsername)
	} else {
		v.Add("chat_id", strconv.FormatInt(config.ChatID, 10))
	}
	v.Add("user_id", strconv.Itoa(config.UserID))

	bot.debugLog("unbanChatMember", v, nil)

	return bot.MakeRequest("unbanChatMember", v)
}