@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

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

+10
+10
src/applications/transactions/storage/PhabricatorApplicationTransaction.php
··· 1033 1033 count($rem), 1034 1034 $this->renderSubscriberList($rem, 'rem')); 1035 1035 } else if ($add) { 1036 + if ($this->isSelfSubscription()) { 1037 + return pht( 1038 + '%s subscribed.', 1039 + $this->renderHandleLink($author_phid)); 1040 + } 1036 1041 return pht( 1037 1042 '%s added %d subscriber(s): %s.', 1038 1043 $this->renderHandleLink($author_phid), 1039 1044 count($add), 1040 1045 $this->renderSubscriberList($add, 'add')); 1041 1046 } else if ($rem) { 1047 + if ($this->isSelfSubscription()) { 1048 + return pht( 1049 + '%s unsubscribed.', 1050 + $this->renderHandleLink($author_phid)); 1051 + } 1042 1052 return pht( 1043 1053 '%s removed %d subscriber(s): %s.', 1044 1054 $this->renderHandleLink($author_phid),