Skip to content

Commit cd82943

Browse files
sophiebitsepriestley
authored andcommitted
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
1 parent b039122 commit cd82943

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

src/applications/feed/worker/FeedPublisherHTTPWorker.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ protected function doWork() {
1313
'storyType' => $data->getStoryType(),
1414
'storyData' => $data->getStoryData(),
1515
'storyAuthorPHID' => $data->getAuthorPHID(),
16+
'storyText' => $story->renderText(),
1617
'epoch' => $data->getEpoch(),
1718
);
1819

src/applications/tokens/feed/PhabricatorTokenGivenFeedStory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function renderText() {
4848
strip_tags(
4949
hsprintf(
5050
'%s',
51-
$this->renderView()->render())));
51+
$this->renderView()->getTitle())));
5252
}
5353

5454
}

src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function renderText() {
7070
strip_tags(
7171
hsprintf(
7272
'%s',
73-
$this->renderView()->render())));
73+
$this->renderView()->getTitle())));
7474
}
7575

7676
}

src/view/phui/PHUIFeedStoryView.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ public function setTitle($title) {
3030
return $this;
3131
}
3232

33+
public function getTitle() {
34+
return $this->title;
35+
}
36+
3337
public function setEpoch($epoch) {
3438
$this->epoch = $epoch;
3539
return $this;

0 commit comments

Comments
 (0)