@@ -18,18 +18,19 @@ class DifferentialClient(val conduitClient: ConduitClient) {
1818 * @param message the content of the comment
1919 * @param silent whether or not to trigger an email
2020 * @param action phabricator comment action, e.g. 'resign', 'reject', 'none'
21+ * @param attachInlines whether attach inline comments or not
2122 * @return the Conduit API response
2223 * @throws IOException if there is a network error talking to Conduit
2324 * @throws ConduitException if any error is experienced talking to Conduit
2425 */
2526 @Throws(IOException ::class , ConduitException ::class )
26- fun postComment (revisionID : String , message : String , silent : Boolean , action : String ): JSONObject {
27- var params = JSONObject ()
27+ fun postComment (revisionID : String , message : String , silent : Boolean , action : String , attachInlines : Boolean = true ): JSONObject {
28+ val params = JSONObject ()
2829 .put(" revision_id" , revisionID)
2930 .put(" action" , action)
3031 .put(" message" , message)
3132 .put(" silent" , silent)
32- .put(" attach_inlines" , true )
33+ .put(" attach_inlines" , attachInlines )
3334 return conduitClient.perform(" differential.createcomment" , params)
3435 }
3536
@@ -64,12 +65,13 @@ class DifferentialClient(val conduitClient: ConduitClient) {
6465 * Post a comment on the differential
6566 * @param revisionID the revision ID (e.g. "D1234" without the "D")
6667 * @param message the string message to post
68+ * @param attachInlines whether attach inline comments or not
6769 * @return the Conduit API response
6870 * @throws ConduitException if any error is experienced talking to Conduit
6971 */
7072 @Throws(ConduitException ::class )
71- fun postComment (revisionID : String , message : String ): JSONObject {
72- return postComment(revisionID, message, false , " none" )
73+ fun postComment (revisionID : String , message : String , attachInlines : Boolean = true ): JSONObject {
74+ return postComment(revisionID, message, false , " none" , attachInlines )
7375 }
7476
7577 /* *
0 commit comments