1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 22:40:55 +01:00

Fix double-rendering of inline comments in mail

Summary: Ref T2222. This is a `tmp.differential`-only issue. Inline comment transactions now have content, so we treat them like body text. We also render them separately as inline text. This produces mail where inlines are rendered twice.

Test Plan: Sent myself mail, saw only one copy of inlines.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2222

Differential Revision: https://secure.phabricator.com/D8216
This commit is contained in:
epriestley 2014-02-13 12:12:17 -08:00
parent 62cb584083
commit 29918e1bd4
2 changed files with 5 additions and 0 deletions

View file

@ -122,6 +122,7 @@ final class DifferentialAction {
self::ACTION_ADDCCS => 'added CCs to',
self::ACTION_CLAIM => 'commandeered',
self::ACTION_REOPEN => 'reopened',
DifferentialTransaction::TYPE_INLINE => 'commented on',
);
if (!empty($verbs[$action])) {

View file

@ -154,6 +154,10 @@ final class DifferentialCommentMail extends DifferentialMail {
$body[] = null;
foreach ($this->getComments() as $comment) {
if ($comment->getAction() == DifferentialTransaction::TYPE_INLINE) {
// These have comment content now, but are rendered below.
continue;
}
$content = $comment->getContent();
if (strlen($content)) {
$body[] = $this->formatText($content);