diff --git a/src/applications/phid/handle/PhabricatorObjectHandleData.php b/src/applications/phid/handle/PhabricatorObjectHandleData.php index 636c02b302..dd4f9e9ac9 100644 --- a/src/applications/phid/handle/PhabricatorObjectHandleData.php +++ b/src/applications/phid/handle/PhabricatorObjectHandleData.php @@ -539,6 +539,29 @@ final class PhabricatorObjectHandleData { $handles[$phid] = $handle; } break; + case PhabricatorPHIDConstants::PHID_TYPE_POST: + $posts = id(new PhamePostQuery()) + ->withPHIDs($phids) + ->setViewer($this->viewer) + ->execute(); + $posts = mpull($posts, null, 'getPHID'); + + foreach ($phids as $phid) { + $handle = new PhabricatorObjectHandle(); + $handle->setPHID($phid); + $handle->setType($type); + if (empty($posts[$phid])) { + $handle->setName('Unknown Post'); + } else { + $post = $posts[$phid]; + $handle->setName($post->getTitle()); + $handle->setFullName($post->getTitle()); + $handle->setURI('/phame/post/view/'.$post->getID().'/'); + $handle->setComplete(true); + } + $handles[$phid] = $handle; + } + break; default: $loader = null; if (isset($external_loaders[$type])) {