Differential D10585 Diff 25583 src/applications/conpherence/conduit/ConpherenceUpdateThreadConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conpherence/conduit/ConpherenceUpdateThreadConduitAPIMethod.php
Show All 12 Lines | final class ConpherenceUpdateThreadConduitAPIMethod | ||||
public function defineParamTypes() { | public function defineParamTypes() { | ||||
return array( | return array( | ||||
'id' => 'optional int', | 'id' => 'optional int', | ||||
'phid' => 'optional phid', | 'phid' => 'optional phid', | ||||
'title' => 'optional string', | 'title' => 'optional string', | ||||
'message' => 'optional string', | 'message' => 'optional string', | ||||
'addParticipantPHIDs' => 'optional list<phids>', | 'addParticipantPHIDs' => 'optional list<phids>', | ||||
'removeParticipantPHID' => 'optional phid' | 'removeParticipantPHID' => 'optional phid', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | public function defineReturnType() { | ||||
return 'bool'; | return 'bool'; | ||||
} | } | ||||
public function defineErrorTypes() { | public function defineErrorTypes() { | ||||
return array( | return array( | ||||
'ERR_USAGE_NO_THREAD_ID' => pht( | 'ERR_USAGE_NO_THREAD_ID' => pht( | ||||
'You must specify a thread id or thread phid to query transactions '. | 'You must specify a thread id or thread phid to query transactions '. | ||||
'from.'), | 'from.'), | ||||
'ERR_USAGE_THREAD_NOT_FOUND' => pht( | 'ERR_USAGE_THREAD_NOT_FOUND' => pht( | ||||
'Thread does not exist or logged in user can not see it.'), | 'Thread does not exist or logged in user can not see it.'), | ||||
'ERR_USAGE_ONLY_SELF_REMOVE' => pht( | 'ERR_USAGE_ONLY_SELF_REMOVE' => pht( | ||||
'Only a user can remove themselves from a thread.'), | 'Only a user can remove themselves from a thread.'), | ||||
'ERR_USAGE_NO_UPDATES' => pht( | 'ERR_USAGE_NO_UPDATES' => pht( | ||||
'You must specify data that actually updates the conpherence.') | 'You must specify data that actually updates the conpherence.'), | ||||
); | ); | ||||
} | } | ||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$user = $request->getUser(); | $user = $request->getUser(); | ||||
$id = $request->getValue('id'); | $id = $request->getValue('id'); | ||||
$phid = $request->getValue('phid'); | $phid = $request->getValue('phid'); | ||||
$query = id(new ConpherenceThreadQuery()) | $query = id(new ConpherenceThreadQuery()) | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |