This commit is contained in:
aozhiwei 2020-06-24 15:05:58 +08:00
parent 3ddd0fdcb5
commit 8f80a17088
2 changed files with 4 additions and 4 deletions

View File

@ -302,7 +302,7 @@ void Player::_CMFriendAgree(f8::MsgHdr& hdr, const cs::CMFriendAgree& msg)
AccountId(), AccountId(),
1 1
); );
ClearApplyByTarget(msg.apply().target_id()); ClearApplyBySenderId(msg.apply().base_data().account_id());
} }
void Player::_CMFriendRefuse(f8::MsgHdr& hdr, const cs::CMFriendRefuse& msg) void Player::_CMFriendRefuse(f8::MsgHdr& hdr, const cs::CMFriendRefuse& msg)
@ -1118,11 +1118,11 @@ void Player::ClearApplyByIdx(long long idx)
} }
} }
void Player::ClearApplyByTarget(const std::string& target_id) void Player::ClearApplyBySenderId(const std::string& sender_id)
{ {
std::vector<long long> deleted_applys; std::vector<long long> deleted_applys;
for (auto& pair : apply_hash_) { for (auto& pair : apply_hash_) {
if (pair.second->target_id == target_id) { if (pair.second->base_data.account_id == sender_id) {
deleted_applys.push_back(pair.first); deleted_applys.push_back(pair.first);
} }
} }

View File

@ -132,7 +132,7 @@ private:
void OnDailyReset(); void OnDailyReset();
void RecalcRedPoint(); void RecalcRedPoint();
void ClearApplyByIdx(long long idx); void ClearApplyByIdx(long long idx);
void ClearApplyByTarget(const std::string& target_id); void ClearApplyBySenderId(const std::string& sender_id);
void RefreshFriendData(); void RefreshFriendData();
void RemoveHandledApply(); void RemoveHandledApply();
void QueryUserOnline(std::vector<std::string> account_ids); void QueryUserOnline(std::vector<std::string> account_ids);