mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
Auto-subscription: little less verbose
Summary: When the user "Mrs. Kitten" adds or remove "Mrs. Kitten" as Subscriber, usually these messages were generated: Mrs. Kitten added a subscriber: Mrs. Kitten. Mrs. Kitten removed a subscriber: Mrs. Kitten. This was a bit like the Spiderman meme self-pointing Spiderman. After this change, these beautiful messages are generated instead: Mrs. Kitten subscribed. Mrs. Kitten unsubscribed. | Before | After | | {F286215} | {F286216} | Closes T15347 Test Plan: - subscribe on something - unsubscribe from something - all other cases remain as-is Reviewers: O1 Blessed Committers, bfs, speck Reviewed By: O1 Blessed Committers, bfs, speck Subscribers: bfs, speck, tobiaswiese, Matthew, Cigaryno Maniphest Tasks: T15347 Differential Revision: https://we.phorge.it/D25191
This commit is contained in:
parent
1c098c273d
commit
7fe622e5d3
1 changed files with 10 additions and 0 deletions
|
@ -1033,12 +1033,22 @@ abstract class PhabricatorApplicationTransaction
|
|||
count($rem),
|
||||
$this->renderSubscriberList($rem, 'rem'));
|
||||
} else if ($add) {
|
||||
if ($this->isSelfSubscription()) {
|
||||
return pht(
|
||||
'%s subscribed.',
|
||||
$this->renderHandleLink($author_phid));
|
||||
}
|
||||
return pht(
|
||||
'%s added %d subscriber(s): %s.',
|
||||
$this->renderHandleLink($author_phid),
|
||||
count($add),
|
||||
$this->renderSubscriberList($add, 'add'));
|
||||
} else if ($rem) {
|
||||
if ($this->isSelfSubscription()) {
|
||||
return pht(
|
||||
'%s unsubscribed.',
|
||||
$this->renderHandleLink($author_phid));
|
||||
}
|
||||
return pht(
|
||||
'%s removed %d subscriber(s): %s.',
|
||||
$this->renderHandleLink($author_phid),
|
||||
|
|
Loading…
Reference in a new issue