Page MenuHomePhabricator

D21826.id52010.diff
No OneTemporary

D21826.id52010.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1294,7 +1294,6 @@
'DrydockWorkingCopyBlueprintImplementation' => 'applications/drydock/blueprint/DrydockWorkingCopyBlueprintImplementation.php',
'EdgeSearchConduitAPIMethod' => 'infrastructure/edges/conduit/EdgeSearchConduitAPIMethod.php',
'FeedConduitAPIMethod' => 'applications/feed/conduit/FeedConduitAPIMethod.php',
- 'FeedPublishConduitAPIMethod' => 'applications/feed/conduit/FeedPublishConduitAPIMethod.php',
'FeedPublisherHTTPWorker' => 'applications/feed/worker/FeedPublisherHTTPWorker.php',
'FeedPublisherWorker' => 'applications/feed/worker/FeedPublisherWorker.php',
'FeedPushWorker' => 'applications/feed/worker/FeedPushWorker.php',
@@ -7371,7 +7370,6 @@
'DrydockWorkingCopyBlueprintImplementation' => 'DrydockBlueprintImplementation',
'EdgeSearchConduitAPIMethod' => 'ConduitAPIMethod',
'FeedConduitAPIMethod' => 'ConduitAPIMethod',
- 'FeedPublishConduitAPIMethod' => 'FeedConduitAPIMethod',
'FeedPublisherHTTPWorker' => 'FeedPushWorker',
'FeedPublisherWorker' => 'FeedPushWorker',
'FeedPushWorker' => 'PhabricatorWorker',
diff --git a/src/applications/feed/conduit/FeedPublishConduitAPIMethod.php b/src/applications/feed/conduit/FeedPublishConduitAPIMethod.php
deleted file mode 100644
--- a/src/applications/feed/conduit/FeedPublishConduitAPIMethod.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-
-final class FeedPublishConduitAPIMethod extends FeedConduitAPIMethod {
-
- public function getAPIMethodName() {
- return 'feed.publish';
- }
-
- public function getMethodStatus() {
- return self::METHOD_STATUS_UNSTABLE;
- }
-
- public function getMethodDescription() {
- return pht('Publish a story to the feed.');
- }
-
- protected function defineParamTypes() {
- return array(
- 'type' => 'required string',
- 'data' => 'required dict',
- 'time' => 'optional int',
- );
- }
-
- protected function defineReturnType() {
- return 'nonempty phid';
- }
-
- protected function execute(ConduitAPIRequest $request) {
- $type = $request->getValue('type');
- $data = $request->getValue('data');
- $time = $request->getValue('time');
-
- $author_phid = $request->getUser()->getPHID();
- $phids = array($author_phid);
-
- $publisher = new PhabricatorFeedStoryPublisher();
- $publisher->setStoryType($type);
- $publisher->setStoryData($data);
- $publisher->setStoryTime($time);
- $publisher->setRelatedPHIDs($phids);
- $publisher->setStoryAuthorPHID($author_phid);
-
- $data = $publisher->publish();
-
- return $data->getPHID();
- }
-
-}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 8:59 AM (12 h, 41 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6774169
Default Alt Text
D21826.id52010.diff (2 KB)

Event Timeline