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
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user