. * */ use Friendica\App; use Friendica\Network\HTTPException; use Friendica\Core\Logger; use Friendica\Core\Session; use Friendica\Model\Item; use Friendica\Util\Strings; function subthread_content(App $a) { if (!Session::isAuthenticated()) { throw new HTTPException\ForbiddenException(); } $item_id = (($a->argc > 1) ? Strings::escapeTags(trim($a->argv[1])) : 0); if (!Item::performActivity($item_id, 'follow')) { Logger::info('Following item failed', ['item' => $item_id]); throw new HTTPException\BadRequestException(); } Logger::info('Followed item', ['item' => $item_id]); return; }