From 3d14b76f4dbe994dec01779d840e7dc8a0ffd98b Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 11 Dec 2015 18:45:09 -0800 Subject: [PATCH] Fix double feed stories in Phame Summary: Ref T9360. Fixes the double-rendering of post bodies in feed stories. Downside is that 'publish' (on its own) no longer shows a body, but that seems fine. Test Plan: - Got some double bodies. - Applied patch. - No more double bodies. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9360 Differential Revision: https://secure.phabricator.com/D14748 --- .../phame/storage/PhamePostTransaction.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/applications/phame/storage/PhamePostTransaction.php b/src/applications/phame/storage/PhamePostTransaction.php index 063bc4ad66..ed341e17db 100644 --- a/src/applications/phame/storage/PhamePostTransaction.php +++ b/src/applications/phame/storage/PhamePostTransaction.php @@ -190,26 +190,12 @@ final class PhamePostTransaction } public function getRemarkupBodyForFeed(PhabricatorFeedStory $story) { - $text = null; switch ($this->getTransactionType()) { - case self::TYPE_TITLE: - if ($this->getOldValue() === null) { - $post = $story->getPrimaryObject(); - $text = $post->getBody(); - } - break; - case self::TYPE_VISIBILITY: - if ($this->getNewValue() == PhameConstants::VISIBILITY_PUBLISHED) { - $post = $story->getPrimaryObject(); - $text = $post->getBody(); - } - break; case self::TYPE_BODY: - $text = $this->getNewValue(); - break; + return $this->getNewValue(); } - return $text; + return null; } public function getColor() {