@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
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix two edge case issues with Differential mail tags

Summary:
Via Asana. The tags on Differential mail are wrong in two cases:

- Transactions which submit inline comments but no comment text are not labeled as "comments", but should be.
- Non-close, non-comment transactions are not labeled at all, but should be labeled "other".

Test Plan: Submitted a no-comments, inlines-only transaction and got a message with proper `X-Phabricator-Mail-Tags` header.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7912

+8 -1
+8 -1
src/applications/differential/mail/DifferentialCommentMail.php
··· 56 56 break; 57 57 } 58 58 59 - if (strlen(trim($comment->getContent()))) { 59 + $has_comment = strlen(trim($comment->getContent())); 60 + $has_inlines = (bool)$this->getInlineComments(); 61 + 62 + if ($has_comment || $has_inlines) { 60 63 switch ($action) { 61 64 case DifferentialAction::ACTION_CLOSE: 62 65 // Commit comments are auto-generated and not especially interesting, ··· 66 69 $tags[] = MetaMTANotificationType::TYPE_DIFFERENTIAL_COMMENT; 67 70 break; 68 71 } 72 + } 73 + 74 + if (!$tags) { 75 + $tags[] = MetaMTANotificationType::TYPE_DIFFERENTIAL_OTHER; 69 76 } 70 77 71 78 return $tags;