mirror of
https://github.com/friendica/friendica
synced 2025-04-19 09:50:11 +00:00
Add routes for current BaseModules
This commit is contained in:
parent
b6b9e57488
commit
07ba1b200c
16 changed files with 806 additions and 722 deletions
|
@ -5,11 +5,10 @@
|
|||
namespace Friendica\Module;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Protocol\ActivityPub;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Util\HTTPSignature;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Protocol\ActivityPub;
|
||||
|
||||
/**
|
||||
* ActivityPub Objects
|
||||
|
@ -32,9 +31,11 @@ class Objects extends BaseModule
|
|||
// $requester = HTTPSignature::getSigner('', $_SERVER);
|
||||
|
||||
// At first we try the original post with that guid
|
||||
// @TODO: Replace with parameter from router
|
||||
$item = Item::selectFirst(['id'], ['guid' => $a->argv[1], 'origin' => true, 'private' => false]);
|
||||
if (!DBA::isResult($item)) {
|
||||
// If no original post could be found, it could possibly be a forum post, there we remove the "origin" field.
|
||||
// @TODO: Replace with parameter from router
|
||||
$item = Item::selectFirst(['id', 'author-link'], ['guid' => $a->argv[1], 'private' => false]);
|
||||
if (!DBA::isResult($item) || !strstr($item['author-link'], System::baseUrl())) {
|
||||
System::httpExit(404);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue