Skip to content

Commit

Permalink
Not you
Browse files Browse the repository at this point in the history
  • Loading branch information
thecoop committed Dec 9, 2024
1 parent 2810335 commit c7e3bcf
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ public InvalidateApiKeyRequest(StreamInput in) throws IOException {
}
validateIds(ids);
name = textOrNull(in.readOptionalString());
ownedByAuthenticatedUser = in.readOptionalBoolean();
if (in.getTransportVersion().onOrAfter(TransportVersions.V_7_4_0)) {
ownedByAuthenticatedUser = in.readOptionalBoolean();
} else {
ownedByAuthenticatedUser = false;
}
}

public InvalidateApiKeyRequest(
Expand Down Expand Up @@ -219,7 +223,9 @@ public void writeTo(StreamOutput out) throws IOException {
}
}
out.writeOptionalString(name);
out.writeOptionalBoolean(ownedByAuthenticatedUser);
if (out.getTransportVersion().onOrAfter(TransportVersions.V_7_4_0)) {
out.writeOptionalBoolean(ownedByAuthenticatedUser);
}
}

@Override
Expand Down

0 comments on commit c7e3bcf

Please sign in to comment.