Do not add actor as subscriber when removing a comment
Summary:
When an admin removes a comment (e.g. spam), the admin gets subscribed to the task. This is usually unwanted as the removal action does not imply that the admin is interested in receiving future notifications about the task, in contrast to e.g. adding a comment to a discussion in the task.
Any transaction of a comment (add, edit, remove) is a "core:comment" action. The code calls applyImplicitCC() which calls shouldImplyCC() which returns the bool $xaction->isCommentTransaction(). Expand this bool to $xaction->isCommentTransaction() && !($xaction->getComment()->getIsRemoved()).
Closes T15899
Test Plan:
- As an admin, go to a task which has comments and to which you are not subscribed
- Click the dropdown for the comment, select Remove comment
- See that you did not get subscribed to the task
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15899
Differential Revision: https://we.phorge.it/D25760