mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 10:42:41 +01:00
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:
parent
4b77bbd60c
commit
3d14b76f4d
1 changed files with 2 additions and 16 deletions
|
@ -190,26 +190,12 @@ final class PhamePostTransaction
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRemarkupBodyForFeed(PhabricatorFeedStory $story) {
|
public function getRemarkupBodyForFeed(PhabricatorFeedStory $story) {
|
||||||
$text = null;
|
|
||||||
switch ($this->getTransactionType()) {
|
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:
|
case self::TYPE_BODY:
|
||||||
$text = $this->getNewValue();
|
return $this->getNewValue();
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $text;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getColor() {
|
public function getColor() {
|
||||||
|
|
Loading…
Reference in a new issue