This commit is contained in:
aozhiwei 2020-06-24 16:10:37 +08:00
parent 09d8bbf366
commit c1eeca2c67

View File

@ -482,14 +482,16 @@ void Player::_CMGroupRename(f8::MsgHdr& hdr, const cs::CMGroupRename& msg)
void Player::_SS_IM_FriendAgreeRequest(f8::MsgHdr& hdr, const ss::SS_IM_FriendAgreeRequest& msg) void Player::_SS_IM_FriendAgreeRequest(f8::MsgHdr& hdr, const ss::SS_IM_FriendAgreeRequest& msg)
{ {
if (!GetFriendById(msg.context().user_info().base_data().account_id())) { if (!GetFriendById(msg.context().user_info().base_data().account_id())) {
Friend* friendobj = new Friend; if (CanAddFriend(msg.context().user_info().base_data().account_id())) {
TypeConvert::Convert(msg.context().user_info().base_data(), friendobj->base_data); Friend* friendobj = new Friend;
TypeConvert::Convert(msg.context().user_info().temp_custom_data(), friendobj->temp_custom_data); TypeConvert::Convert(msg.context().user_info().base_data(), friendobj->base_data);
if (AddFriend(friendobj) != 0) { TypeConvert::Convert(msg.context().user_info().temp_custom_data(), friendobj->temp_custom_data);
delete friendobj; if (AddFriend(friendobj) != 0) {
return; delete friendobj;
return;
}
QueryUserOnline({friendobj->base_data.account_id});
} }
QueryUserOnline({friendobj->base_data.account_id});
} }
RemoveHandledApply(); RemoveHandledApply();
f8::MsgHdr* hdr_copy = hdr.Clone(); f8::MsgHdr* hdr_copy = hdr.Clone();