remove debug/todos for live tests

This commit is contained in:
Yannis Vogel 2025-04-30 22:49:20 +02:00
parent 8ea9bdcf9a
commit ce7aa5c72d
No known key found for this signature in database
5 changed files with 4 additions and 15 deletions

View file

@ -156,12 +156,6 @@ class FedUsers implements APIInterface
'type' => $user->type 'type' => $user->type
]; ];
$this->response = $this->main->renderTemplate('user.json', $data); $this->response = $this->main->renderTemplate('user.json', $data);
// todo remove HTTP again
$this->response = str_replace(
'https://192.168.178.143/',
'http://192.168.178.143/',
$this->response
);
return true; return true;
} }
/** /**

View file

@ -84,7 +84,7 @@ class Outbox implements \Federator\Api\FedUsers\FedUsersInterface
$outbox->setPrev($id . '&min=' . $oldestId); $outbox->setPrev($id . '&min=' . $oldestId);
} }
$obj = $outbox->toObject(); $obj = $outbox->toObject();
return json_encode($obj, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT); // todo remove pretty return json_encode($obj);
} }
/** /**

View file

@ -129,7 +129,7 @@ class NewContent implements \Federator\Api\APIInterface
} }
} }
if (empty($users)) { // todo remove, debugging for now if (empty($users)) { // todo remove after proper implementation, debugging for now
$rootDir = $_SERVER['DOCUMENT_ROOT'] . '../'; $rootDir = $_SERVER['DOCUMENT_ROOT'] . '../';
// Save the raw input and parsed JSON to a file for inspection // Save the raw input and parsed JSON to a file for inspection
file_put_contents( file_put_contents(

View file

@ -67,12 +67,6 @@ class WebFinger
'domain' => $domain, 'domain' => $domain,
]; ];
$response = $this->main->renderTemplate('webfinger_acct.json', $data); $response = $this->main->renderTemplate('webfinger_acct.json', $data);
// todo remove HTTP again
$response = str_replace(
'https://192.168.178.143',
'http://192.168.178.143',
$response
);
$this->wellKnown->setResponse($response); $this->wellKnown->setResponse($response);
return true; return true;
} }

View file

@ -58,10 +58,11 @@ class ContentNation implements Connector
*/ */
public function getRemoteFollowersOfUser($userId) public function getRemoteFollowersOfUser($userId)
{ {
// todo implement queue for this, move to DIO
if (preg_match("#^([^@]+)@([^/]+)#", $userId, $matches) == 1) { if (preg_match("#^([^@]+)@([^/]+)#", $userId, $matches) == 1) {
$userId = $matches[1]; $userId = $matches[1];
} }
$remoteURL = $this->service . '/api/profile/' . urlencode($userId) . '/followers'; // todo implement/change $remoteURL = $this->service . '/api/profile/' . urlencode($userId) . '/followers';
[$response, $info] = \Federator\Main::getFromRemote($remoteURL, []); [$response, $info] = \Federator\Main::getFromRemote($remoteURL, []);
if ($info['http_code'] != 200) { if ($info['http_code'] != 200) {