private boolean friendRequestResponse(FriendRequestResponseMessage message, Connection sourceConnection) {
    FriendRequest friendRequest = message.getFriendRequest();
    try {
      if (message.isAccepted()) {
        databaseOperations.addFriend(friendRequest.getFromUsername(), friendRequest.getToUsername());
        User user = userManager.getUserByUsername(friendRequest.getFromUsername());
        NewFriendMessage response = new NewFriendMessage(new Friend(friendRequest.getFromName(),
            friendRequest.getFromUsername(), user == null ? false : true));
        writeResponse(response, sourceConnection);
        if (user != null) {
          UserRecord userRecord = databaseOperations.getUserRecord(friendRequest.getToUsername());
          response = new NewFriendMessage(new Friend(userRecord.getName(), userRecord.getUsername(), true));
          writeResponse(response, user.getConnection());
        }
      }
      databaseOperations.deleteFriendRequest(friendRequest.getFromUsername(), friendRequest.getToUsername());
    }
    catch (SQLException e) {
      return false;
    }
    return true;
  }