查询好友添加20个数量限制

This commit is contained in:
aozhiwei 2020-07-03 17:19:15 +08:00
parent b11389ec88
commit d03402c6a6

View File

@ -447,7 +447,9 @@ void Player::_CMQueryUserStatus(f8::MsgHdr& hdr, const cs::CMQueryUserStatus& ms
{ {
std::vector<std::string> account_ids; std::vector<std::string> account_ids;
for (auto& account_id : msg.user_list()) { for (auto& account_id : msg.user_list()) {
account_ids.push_back(account_id); if (account_ids.size() < 20) {
account_ids.push_back(account_id);
}
} }
AsyncTaskMgr::Instance()->CreateQueryUserStatusTask(this, account_ids); AsyncTaskMgr::Instance()->CreateQueryUserStatusTask(this, account_ids);
} }