diff --git a/game-server/app/servers/role/handler/friendHandler.ts b/game-server/app/servers/role/handler/friendHandler.ts index 3d3e4d28a..062f9cae4 100644 --- a/game-server/app/servers/role/handler/friendHandler.ts +++ b/game-server/app/servers/role/handler/friendHandler.ts @@ -420,11 +420,18 @@ export class FriendHandler { if (!friend) { str = getResStr(STATUS.FRIEND_HIS_APPLY_MAX); } else { - let apply = await FriendApplyModel.createApply(hisRoleId, role); - let hisOnlineInfo = await getRoleOnlineInfo(hisRoleId); - if(hisOnlineInfo) { - let myApply = await getMyApplyParam(apply.applyCode, role); - sendMessageToUserWithSuc(friend.roleId, PUSH_ROUTE.FRIEND_APPLY, { apply: myApply }, hisOnlineInfo.sid); + let hisRelation = await FriendRelationModel.findFriendByRole(hisRoleId, POPULATE_TYPE.NOT); + let hisType = getRecommendType(hisRelation, hisRoleId, roleId); + if(hisType == FRIEND_RELATION_TYPE.NORMAL) { + let incResult = await RoleModel.increaseFriendApplyCnt(hisRoleId, 1, FRIEND.FRIEND_MANAGE_APPLICATION); + if (incResult) { + let apply = await FriendApplyModel.createApply(hisRoleId, role); + let hisOnlineInfo = await getRoleOnlineInfo(hisRoleId); + if(hisOnlineInfo) { + let myApply = await getMyApplyParam(apply.applyCode, role); + sendMessageToUserWithSuc(friend.roleId, PUSH_ROUTE.FRIEND_APPLY, { apply: myApply }, hisOnlineInfo.sid); + } + } } } }