@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<?php
2
3final class ManiphestClaimEmailCommand
4 extends ManiphestEmailCommand {
5
6 public function getCommand() {
7 return 'claim';
8 }
9
10 public function getCommandSummary() {
11 return pht(
12 'Assign yourself as the owner of a task. To assign another user, '.
13 'see `%s`.',
14 '!assign');
15 }
16
17 public function buildTransactions(
18 PhabricatorUser $viewer,
19 PhabricatorApplicationTransactionInterface $object,
20 PhabricatorMetaMTAReceivedMail $mail,
21 $command,
22 array $argv) {
23 $xactions = array();
24
25 $xactions[] = $object->getApplicationTransactionTemplate()
26 ->setTransactionType(ManiphestTaskOwnerTransaction::TRANSACTIONTYPE)
27 ->setNewValue($viewer->getPHID());
28
29 return $xactions;
30 }
31
32}