diff --git a/src/applications/phame/storage/PhamePostTransaction.php b/src/applications/phame/storage/PhamePostTransaction.php index befbfd6687..5e28b87198 100644 --- a/src/applications/phame/storage/PhamePostTransaction.php +++ b/src/applications/phame/storage/PhamePostTransaction.php @@ -185,7 +185,7 @@ final class PhamePostTransaction return parent::getTitleForFeed(); } - public function getBodyForFeed(PhabricatorFeedStory $story) { + public function getRemarkupBodyForFeed(PhabricatorFeedStory $story) { $text = null; switch ($this->getTransactionType()) { case self::TYPE_TITLE: @@ -205,11 +205,7 @@ final class PhamePostTransaction break; } - if (strlen($text)) { - return PhabricatorMarkupEngine::summarize($text); - } - - return parent::getBodyForFeed($story); + return $text; } public function getColor() { diff --git a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php index 9eb1609931..df46649c08 100644 --- a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php +++ b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php @@ -964,6 +964,12 @@ abstract class PhabricatorApplicationTransaction } public function getBodyForFeed(PhabricatorFeedStory $story) { + $remarkup = $this->getRemarkupBodyForFeed($story); + if ($remarkup !== null) { + $remarkup = PhabricatorMarkupEngine::summarize($remarkup); + return new PHUIRemarkupView($this->viewer, $remarkup); + } + $old = $this->getOldValue(); $new = $this->getNewValue(); @@ -981,6 +987,10 @@ abstract class PhabricatorApplicationTransaction return $body; } + public function getRemarkupBodyForFeed(PhabricatorFeedStory $story) { + return null; + } + public function getActionStrength() { if ($this->isInlineCommentTransaction()) { return 0.25;