From df8474d778048a7364b2e332a1e4cae55d93291e Mon Sep 17 00:00:00 2001 From: Joel Beales Date: Tue, 17 Sep 2013 17:11:08 -0700 Subject: [PATCH] Conduit - Add option for createcomment to attach draft inline comments Summary: Conduit has a query to make a draft inline comment, but createcomment doesn't have the ability to attach them. Added optional parameter to attach any existing draft comments. Default value is false, so existing api users won't be effected by the change. Test Plan: Tested no draft comments and multiple draft comments, attach_inlines =true, false, and empty. Reviewers: vrana Reviewed By: vrana CC: epriestley, aran Differential Revision: https://secure.phabricator.com/D7019 --- .../ConduitAPI_differential_createcomment_Method.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/applications/differential/conduit/ConduitAPI_differential_createcomment_Method.php b/src/applications/differential/conduit/ConduitAPI_differential_createcomment_Method.php index 7be3951872..58d2b43056 100644 --- a/src/applications/differential/conduit/ConduitAPI_differential_createcomment_Method.php +++ b/src/applications/differential/conduit/ConduitAPI_differential_createcomment_Method.php @@ -12,10 +12,11 @@ final class ConduitAPI_differential_createcomment_Method public function defineParamTypes() { return array( - 'revision_id' => 'required revisionid', - 'message' => 'optional string', - 'action' => 'optional string', - 'silent' => 'optional bool', + 'revision_id' => 'required revisionid', + 'message' => 'optional string', + 'action' => 'optional string', + 'silent' => 'optional bool', + 'attach_inlines' => 'optional bool', ); } @@ -52,6 +53,7 @@ final class ConduitAPI_differential_createcomment_Method $editor->setContentSource($content_source); $editor->setMessage($request->getValue('message')); $editor->setNoEmail($request->getValue('silent')); + $editor->setAttachInlineComments($request->getValue('attach_inlines')); $editor->save(); return array(