public override async Task <RemoveFriendResponse> RemoveFriend(RemoveFriendRequest request, ServerCallContext context) { RedisUserModel user = context.UserState["user"] as RedisUserModel; if (user == null) { return new RemoveFriendResponse() { Status = ResponseFactory.createResponse(ResponseType.UNAUTHORIZED) } } ; RedisUserModel friend = await RedisUserModel.GetUserFromGuid(request.FriendId); if (friend == null) { return new RemoveFriendResponse() { Status = ResponseFactory.createResponse(ResponseType.PLAYER_DOES_NOT_EXIST) } } ; if (!await user.IsFriend(friend)) { return new RemoveFriendResponse() { Status = ResponseFactory.createResponse(ResponseType.INVALID_REQUEST) } } ; await user.RemoveFriend(friend); return(new RemoveFriendResponse()); }