  public static void requestFriends(Long id) {
    User user = user();
    User other = User.findById(id);
    Relationship r1 = Relationship.find("SELECT r FROM Relationship r where r.from = ? AND r.to = ?", user, other).first();
    Relationship r2 = Relationship.find("SELECT r FROM Relationship r where r.to = ? AND r.from = ?", user, other).first();
    if (r1 == null) {
      r1 = new Relationship(user, other, true);
    }
    if (r2 != null) {
      if (r2.requested) {
        r1.requested = false;
        r2.requested = false;
        r1.accepted = true;
        r2.accepted = true;
        r1.save();
        r2.save();
      } else if (r2.accepted){
        news(id);
        return;
      } else {
        r1.requested = true;
      }
    }
    else if (r1 != null) {
      if (r1.requested) {
        news(id);
        return;
      } else {
        r1.requested = true;
        r1.save();
        news(id);
        return;
      }
    }
    r1.save();
    news(id);
  }

  public static void requestFriends(Long id) {
    User user = user();
    User other = User.findById(id);
    Relationship r1 = Relationship.find("SELECT r FROM Relationship r where r.from = ? AND r.to = ?", user, other).first();
    Relationship r2 = Relationship.find("SELECT r FROM Relationship r where r.to = ? AND r.from = ?", user, other).first();
    if (r1 == null) {
      r1 = new Relationship(user, other, true);
      r1.save();
    }
    if (r2 != null) {
      if (r2.requested) {
        r1.requested = false;
        r2.requested = false;
        r1.accepted = true;
        r2.accepted = true;
        r1.save();
        r2.save();
      } else if (r2.accepted){
        news(id);
        return;
      } else {
        r1.requested = true;
      }
    }
    else if (r1 != null) {
      if (r1.requested) {
        news(id);
        return;
      } else {
        r1.requested = true;
        r1.save();
        news(id);
        return;
      }
    }
    System.out.println(r1.requested);
    r1.save();
    news(id);
  }
