@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.

Create timeline events for comments

Summary: to enable publishing to internfeed, we create timeline events
for the comments.

Test Plan: create a test revision, comments on it and check if it
creates a timeline event with correct data at /daemon/timeline.

Reviewers: epriestley,tuomaspelkonen

CC:

Differential Revision: 144

+11 -12
+10 -12
src/applications/differential/editor/comment/DifferentialCommentEditor.php
··· 318 318 ->setChangedByCommit($this->getChangedByCommit()) 319 319 ->send(); 320 320 321 - /* 322 - 323 - TODO 324 - 325 - $event = array( 326 - 'revision_id' => $revision->getID(), 327 - 'fbid' => $revision->getFBID(), 328 - 'feedback_id' => $feedback->getID(), 329 - 'action' => $feedback->getAction(), 330 - 'actor' => $this->actorPHID, 321 + $event_data = array( 322 + 'revision_id' => $revision->getID(), 323 + 'revision_phid' => $revision->getPHID(), 324 + 'revision_name' => $revision->getTitle(), 325 + 'revision_author_phid' => $revision->getAuthorPHID(), 326 + 'action' => $comment->getAction(), 327 + 'feedback_content' => $comment->getContent(), 328 + 'actor_phid' => $this->actorPHID, 331 329 ); 332 - id(new ToolsTimelineEvent('difx', fb_json_encode($event)))->record(); 333 - */ 330 + id(new PhabricatorTimelineEvent('difx', $event_data)) 331 + ->recordEvent(); 334 332 335 333 return $comment; 336 334 }
+1
src/applications/differential/editor/comment/__init__.php
··· 14 14 phutil_require_module('phabricator', 'applications/differential/storage/comment'); 15 15 phutil_require_module('phabricator', 'applications/differential/storage/inlinecomment'); 16 16 phutil_require_module('phabricator', 'applications/phid/handle/data'); 17 + phutil_require_module('phabricator', 'infrastructure/daemon/timeline/storage/event'); 17 18 18 19 phutil_require_module('phutil', 'utils'); 19 20