public override async Task <AcceptFriendRequestResponse> AcceptFriendRequest(AcceptFriendRequestRequest request, ServerCallContext context) { RedisUserModel user = context.UserState["user"] as RedisUserModel; if (user == null) { return new AcceptFriendRequestResponse() { Status = ResponseFactory.createResponse(ResponseType.UNAUTHORIZED) } } ; RedisUserModel friend = await RedisUserModel.GetUserFromGuid(request.FriendId); if (friend == null) { return new AcceptFriendRequestResponse() { Status = ResponseFactory.createResponse(ResponseType.PLAYER_DOES_NOT_EXIST) } } ; if (!await user.HasFriendRequestFrom(friend)) { return new AcceptFriendRequestResponse() { Status = ResponseFactory.createResponse(ResponseType.FRIEND_REQUEST_DOES_NOT_EXIST) } } ; return(new AcceptFriendRequestResponse() { Status = await user.AcceptFriendRequestFrom(friend), }); }