Differential.revision.edit api call accept/reject boolean value broken


#1

Observed Behavior:
differential.revision.edit accept/reject calls that have boolean value, the boolean value has no effect Resulting action of “accept”:true is same as “accept”:false . Same goes for reject.

Calling accept:false after accept:true call results in error
echo ‘{“transactions”:[{“type”:“accept”,“value”:false}],“objectIdentifier”:“1687”}’|arc call-conduit --conduit-uri https://git-pos-dev.u-blox.net --conduit-token api-lfw2rzje7gfpq23h3u42rcc2rbuc differential.revision.edit
{“error”:“ERR-CONDUIT-CORE”,“errorMessage”:“ERR-CONDUIT-CORE: Validation errors:\n - You can not accept this revision because you have already accepted it.”,“response”:null}

Same goes for reject.
Expected Behavior:
Phabricator should be able to un-accept a accepted review with accept:false conduit call.
Phabricator should be able to un-reject a rejected review with reject:false call.

At least it should be mentioned somewhere that the boolean value has no meaning or effect. Error messages make no sense.

Phabricator Version:
phabricator
3bf8d5682ed06a6905fc0ca896531312427de1d9

Reproduction Steps:
Calling accept:true , accept:false on a differential revision via conduit api.
Calling reject:true , reject:false on a differential revision via conduit api.

Example:
echo ‘{“transactions”:[{“type”:“accept”,“value”:true}],“objectIdentifier”:“1687”}’|arc call-conduit --conduit-uri https://URLHERE.net --conduit-token TOKENHERE differential.revision.edit

echo ‘{“transactions”:[{“type”:“accept”,“value”:false}],“objectIdentifier”:“1687”}’|arc call-conduit --conduit-uri https://URLHERE.net --conduit-token TOKENHERE differential.revision.edit

Result:
{“error”:“ERR-CONDUIT-CORE”,“errorMessage”:“ERR-CONDUIT-CORE: Validation errors:\n - You can not accept this revision because you have already accepted it.”,“response”:null}