mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Pass actor to revision unsubscriber editor
Summary: I wonder how I tested this. Test Plan: Subscribed, unsubscribed. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4860
This commit is contained in:
parent
714a3cc536
commit
7063ee638e
3 changed files with 9 additions and 7 deletions
|
@ -172,7 +172,7 @@ class DifferentialReplyHandler extends PhabricatorMailReplyHandler {
|
|||
DifferentialRevisionEditor::removeCCAndUpdateRevision(
|
||||
$revision,
|
||||
$user->getPHID(),
|
||||
$user->getPHID());
|
||||
$user);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -59,13 +59,13 @@ final class DifferentialSubscribeController extends DifferentialController {
|
|||
DifferentialRevisionEditor::addCCAndUpdateRevision(
|
||||
$revision,
|
||||
$phid,
|
||||
$phid);
|
||||
$user);
|
||||
break;
|
||||
case 'rem':
|
||||
DifferentialRevisionEditor::removeCCAndUpdateRevision(
|
||||
$revision,
|
||||
$phid,
|
||||
$phid);
|
||||
$user);
|
||||
break;
|
||||
default:
|
||||
return new Aphront400Response();
|
||||
|
|
|
@ -496,12 +496,13 @@ final class DifferentialRevisionEditor extends PhabricatorEditor {
|
|||
public static function addCCAndUpdateRevision(
|
||||
$revision,
|
||||
$phid,
|
||||
$reason) {
|
||||
PhabricatorUser $actor) {
|
||||
|
||||
self::addCC($revision, $phid, $reason);
|
||||
self::addCC($revision, $phid, $actor->getPHID());
|
||||
|
||||
$type = PhabricatorEdgeConfig::TYPE_OBJECT_HAS_UNSUBSCRIBER;
|
||||
id(new PhabricatorEdgeEditor())
|
||||
->setActor($actor)
|
||||
->removeEdge($revision->getPHID(), $type, $phid)
|
||||
->save();
|
||||
}
|
||||
|
@ -509,12 +510,13 @@ final class DifferentialRevisionEditor extends PhabricatorEditor {
|
|||
public static function removeCCAndUpdateRevision(
|
||||
$revision,
|
||||
$phid,
|
||||
$reason) {
|
||||
PhabricatorUser $actor) {
|
||||
|
||||
self::removeCC($revision, $phid, $reason);
|
||||
self::removeCC($revision, $phid, $actor->getPHID());
|
||||
|
||||
$type = PhabricatorEdgeConfig::TYPE_OBJECT_HAS_UNSUBSCRIBER;
|
||||
id(new PhabricatorEdgeEditor())
|
||||
->setActor($actor)
|
||||
->addEdge($revision->getPHID(), $type, $phid)
|
||||
->save();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue