1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Include storyText in feed POST data

Summary: I also changed PhabricatorApplicationTransactionFeedStory and the TokenGivenFeedStory to include only the title/first line of the feed story, which is more convenient (previously, strip_tags gave a multi-line story without even any linebreaks) and more consistent with the other story types.

Test Plan: Added a requestbin URL to feed.http-hooks, commented on a Differential, and saw storyText equal to "alpert added a comment to D2: c." in the POST data it received.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T4630

Differential Revision: https://secure.phabricator.com/D8710
This commit is contained in:
Ben Alpert 2014-04-06 11:48:38 -07:00 committed by epriestley
parent b03912213f
commit cd829434d4
4 changed files with 7 additions and 2 deletions

View file

@ -13,6 +13,7 @@ final class FeedPublisherHTTPWorker extends FeedPushWorker {
'storyType' => $data->getStoryType(),
'storyData' => $data->getStoryData(),
'storyAuthorPHID' => $data->getAuthorPHID(),
'storyText' => $story->renderText(),
'epoch' => $data->getEpoch(),
);

View file

@ -48,7 +48,7 @@ final class PhabricatorTokenGivenFeedStory
strip_tags(
hsprintf(
'%s',
$this->renderView()->render())));
$this->renderView()->getTitle())));
}
}

View file

@ -70,7 +70,7 @@ class PhabricatorApplicationTransactionFeedStory
strip_tags(
hsprintf(
'%s',
$this->renderView()->render())));
$this->renderView()->getTitle())));
}
}

View file

@ -30,6 +30,10 @@ final class PHUIFeedStoryView extends AphrontView {
return $this;
}
public function getTitle() {
return $this->title;
}
public function setEpoch($epoch) {
$this->epoch = $epoch;
return $this;