好友:在黑名单内的玩家的申请不发给拉黑的那个人
This commit is contained in:
@@ -148,18 +148,21 @@ export class FriendHandler {
|
|||||||
} else if (type == FRIEND_RELATION_TYPE.MYSELF) {
|
} else if (type == FRIEND_RELATION_TYPE.MYSELF) {
|
||||||
str = getResStr(STATUS.FRIEND_YOURSELF); continue;
|
str = getResStr(STATUS.FRIEND_YOURSELF); continue;
|
||||||
}
|
}
|
||||||
|
let hisRelation = await FriendRelationModel.findFriendByRole(hisRoleId, POPULATE_TYPE.NOT);
|
||||||
let incResult = await RoleModel.increaseFriendApplyCnt(hisRoleId, 1, FRIEND.FRIEND_MANAGE_APPLICATION);
|
let hisType = getRecommendType(hisRelation, hisRoleId, roleId);
|
||||||
if (!incResult) {
|
if(hisType == FRIEND_RELATION_TYPE.NORMAL) {
|
||||||
str = getResStr(STATUS.FRIEND_HIS_APPLY_MAX); continue;
|
let incResult = await RoleModel.increaseFriendApplyCnt(hisRoleId, 1, FRIEND.FRIEND_MANAGE_APPLICATION);
|
||||||
}
|
if (!incResult) {
|
||||||
|
str = getResStr(STATUS.FRIEND_HIS_APPLY_MAX); continue;
|
||||||
let apply = await FriendApplyModel.createApply(hisRoleId, role);
|
}
|
||||||
resultRoleIds.push(hisRoleId);
|
|
||||||
let hisOnlineInfo = await getRoleOnlineInfo(hisRoleId);
|
let apply = await FriendApplyModel.createApply(hisRoleId, role);
|
||||||
if (hisOnlineInfo.isOnline) {
|
resultRoleIds.push(hisRoleId);
|
||||||
let myApply = await getMyApplyParam(apply.applyCode, role);
|
let hisOnlineInfo = await getRoleOnlineInfo(hisRoleId);
|
||||||
sendMessageToUserWithSuc(hisRoleId, PUSH_ROUTE.FRIEND_APPLY, { apply: myApply }, hisOnlineInfo.sid);
|
if (hisOnlineInfo.isOnline) {
|
||||||
|
let myApply = await getMyApplyParam(apply.applyCode, role);
|
||||||
|
sendMessageToUserWithSuc(hisRoleId, PUSH_ROUTE.FRIEND_APPLY, { apply: myApply }, hisOnlineInfo.sid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user