@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add comment snippets to feed stories

Summary: Fixes T3622

Test Plan: viewed feed, saw some commentary for both pholio inlines and pholio regular comments

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T3622

Differential Revision: https://secure.phabricator.com/D6570

+28
+11
src/applications/pholio/storage/PholioTransaction.php
··· 233 233 return parent::getTitleForFeed(); 234 234 } 235 235 236 + public function getBodyForFeed() { 237 + switch ($this->getTransactionType()) { 238 + case PholioTransactionType::TYPE_INLINE: 239 + $text = $this->getComment()->getContent(); 240 + return phutil_escape_html_newlines( 241 + phutil_utf8_shorten($text, 128)); 242 + break; 243 + } 244 + return parent::getBodyForFeed(); 245 + } 246 + 236 247 public function hasChangeDetails() { 237 248 switch ($this->getTransactionType()) { 238 249 case PholioTransactionType::TYPE_DESCRIPTION:
+1
src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php
··· 44 44 45 45 $xaction->setHandles($this->getHandles()); 46 46 $view->setTitle($xaction->getTitleForFeed()); 47 + $view->appendChild($xaction->getBodyForFeed()); 47 48 48 49 $view->setImage( 49 50 $this->getHandle(
+16
src/applications/transactions/storage/PhabricatorApplicationTransaction.php
··· 379 379 return $this->getTitle(); 380 380 } 381 381 382 + public function getBodyForFeed() { 383 + $old = $this->getOldValue(); 384 + $new = $this->getNewValue(); 385 + 386 + $body = null; 387 + 388 + switch ($this->getTransactionType()) { 389 + case PhabricatorTransactions::TYPE_COMMENT: 390 + $text = $this->getComment()->getContent(); 391 + $body = phutil_escape_html_newlines( 392 + phutil_utf8_shorten($text, 128)); 393 + break; 394 + } 395 + return $body; 396 + } 397 + 382 398 public function getActionStrength() { 383 399 switch ($this->getTransactionType()) { 384 400 case PhabricatorTransactions::TYPE_COMMENT: