@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add a 'silent' option to diffusion.createcomment

Test Plan: Created comments with 'silent' both true and empty, received notifcation for only the latter.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D7916

authored by

John Watson and committed by
epriestley
6639f931 982e0d78

+12 -1
+10 -1
src/applications/audit/editor/PhabricatorAuditCommentEditor.php
··· 8 8 private $auditors = array(); 9 9 private $ccs = array(); 10 10 11 + private $noEmail; 12 + 11 13 public function __construct(PhabricatorRepositoryCommit $commit) { 12 14 $this->commit = $commit; 13 15 return $this; ··· 25 27 26 28 public function setAttachInlineComments($attach_inline_comments) { 27 29 $this->attachInlineComments = $attach_inline_comments; 30 + return $this; 31 + } 32 + 33 + public function setNoEmail($no_email) { 34 + $this->noEmail = $no_email; 28 35 return $this; 29 36 } 30 37 ··· 297 304 id(new PhabricatorSearchIndexer()) 298 305 ->indexDocumentByPHID($commit->getPHID()); 299 306 300 - $this->sendMail($comment, $other_comments, $inline_comments, $requests); 307 + if (!$this->noEmail) { 308 + $this->sendMail($comment, $other_comments, $inline_comments, $requests); 309 + } 301 310 } 302 311 303 312
+2
src/applications/diffusion/conduit/ConduitAPI_diffusion_createcomment_Method.php
··· 21 21 'phid' => 'required string', 22 22 'action' => 'optional string', 23 23 'message' => 'required string', 24 + 'silent' => 'optional bool', 24 25 ); 25 26 } 26 27 ··· 73 74 74 75 id(new PhabricatorAuditCommentEditor($commit)) 75 76 ->setActor($request->getUser()) 77 + ->setNoEmail($request->getValue('silent')) 76 78 ->addComment($comment); 77 79 78 80 return true;