<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
*/
class Fetch extends BaseModule
{
- public static function rawContent(array $parameters = [])
+ protected function rawContent(array $request = [])
{
- if (empty($parameters['guid'])) {
+ if (empty($this->parameters['guid'])) {
throw new HTTPException\NotFoundException();
}
- $guid = $parameters['guid'];
+ $guid = $this->parameters['guid'];
// Fetch the item
$condition = ['origin' => true, 'private' => [Item::PUBLIC, Item::UNLISTED], 'guid' => $guid,
if ($item['gravity'] == GRAVITY_PARENT) {
$status = Diaspora::buildStatus($item, $user);
} else {
- $status = Diaspora::constructComment($item, $user);
+ $status = ['type' => 'comment', 'message' => Diaspora::createCommentSignature($item)];
}
$xml = Diaspora::buildPostXml($status["type"], $status["message"]);