Page MenuHomePhorge

D25760.1734878274.diff
No OneTemporary

D25760.1734878274.diff

diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
--- a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
+++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
@@ -3299,7 +3299,10 @@
/**
- * When a user interacts with an object, we might want to add them to CC.
+ * Adds the actor as a subscriber to the object with which they interact
+ * @param PhabricatorLiskDAO $object on which the action is performed
+ * @param array $xactions Transactions to apply
+ * @return array Transactions to apply
*/
final public function applyImplicitCC(
PhabricatorLiskDAO $object,
@@ -3381,11 +3384,18 @@
return $xactions;
}
+ /**
+ * Whether the action implies the actor should be subscribed on the object
+ * @param PhabricatorLiskDAO $object on which the action is performed
+ * @param PhabricatorApplicationTransaction $xaction Transaction to apply
+ * @return bool True if the actor should be subscribed on the object
+ */
protected function shouldImplyCC(
PhabricatorLiskDAO $object,
PhabricatorApplicationTransaction $xaction) {
- return $xaction->isCommentTransaction();
+ return ($xaction->isCommentTransaction() &&
+ !($xaction->getComment()->getIsRemoved()));
}
diff --git a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
--- a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
+++ b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php
@@ -1580,6 +1580,10 @@
return 100;
}
+ /**
+ * Whether the transaction concerns a comment (e.g. add, edit, remove)
+ * @return bool True if the transaction concerns a comment
+ */
public function isCommentTransaction() {
if ($this->hasComment()) {
return true;
diff --git a/src/applications/transactions/storage/PhabricatorApplicationTransactionComment.php b/src/applications/transactions/storage/PhabricatorApplicationTransactionComment.php
--- a/src/applications/transactions/storage/PhabricatorApplicationTransactionComment.php
+++ b/src/applications/transactions/storage/PhabricatorApplicationTransactionComment.php
@@ -74,6 +74,10 @@
return PhabricatorContentSource::newFromSerialized($this->contentSource);
}
+ /**
+ * Whether the transaction removes the comment
+ * @return bool True if the transaction removes the comment
+ */
public function getIsRemoved() {
return ($this->getIsDeleted() == 2);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 14:37 (12 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1026031
Default Alt Text
D25760.1734878274.diff (2 KB)

Event Timeline