好友:拉黑对方聊天也屏蔽

This commit is contained in:
luying
2022-06-13 16:55:58 +08:00
parent 68e5d11230
commit 106fb3ce39
6 changed files with 39 additions and 16 deletions
@@ -149,6 +149,11 @@ export async function increaseFrdCnt(role1: RoleType, role2: RoleType, originalF
return '';
}
export async function getFriendRelationType(myRoleId: string, roleId: string) {
let myFriendRelation = await FriendRelationModel.findFriendByRole(roleId, POPULATE_TYPE.NOT);
return getRecommendType(myFriendRelation, roleId, myRoleId);
}
export function getRecommendType(myFriendRelation: FriendRelationType, myRoleId: string, roleId: string) {
if(myRoleId == roleId) {
return FRIEND_RELATION_TYPE.MYSELF;