[CONTROLLER][Network] Temporarily remove replies from streams, following planned changes to the Reply plugin
This commit is contained in:
parent
e9cc760ca8
commit
587d701d11
@ -44,6 +44,7 @@ use App\Entity\Note;
|
|||||||
use App\Util\Common;
|
use App\Util\Common;
|
||||||
use App\Util\Exception\ClientException;
|
use App\Util\Exception\ClientException;
|
||||||
use App\Util\Exception\NotFoundException;
|
use App\Util\Exception\NotFoundException;
|
||||||
|
use NotImplementedException;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
||||||
class Network extends Controller
|
class Network extends Controller
|
||||||
@ -76,6 +77,7 @@ class Network extends Controller
|
|||||||
throw new ClientException(_m('User {nickname} doesn\'t exist', ['{nickname}' => $nickname]));
|
throw new ClientException(_m('User {nickname} doesn\'t exist', ['{nickname}' => $nickname]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO Handle replies in home stream
|
||||||
$query = <<<END
|
$query = <<<END
|
||||||
-- Select notes from:
|
-- Select notes from:
|
||||||
select note.* from note left join -- left join ensures all returned notes' ids are not null
|
select note.* from note left join -- left join ensures all returned notes' ids are not null
|
||||||
@ -85,8 +87,8 @@ class Network extends Controller
|
|||||||
where f.subscriber = :target_actor_id
|
where f.subscriber = :target_actor_id
|
||||||
union all
|
union all
|
||||||
-- Replies to notes by target
|
-- Replies to notes by target
|
||||||
select n.id from note n inner join note nr on nr.id = nr.reply_to
|
-- select n.id from note n inner join note nr on nr.id = nr.reply_to
|
||||||
union all
|
-- union all
|
||||||
-- Notifications to target
|
-- Notifications to target
|
||||||
select a.activity_id from notification a inner join note n on a.activity_id = n.id
|
select a.activity_id from notification a inner join note n on a.activity_id = n.id
|
||||||
union all
|
union all
|
||||||
@ -128,6 +130,8 @@ class Network extends Controller
|
|||||||
|
|
||||||
public function replies(Request $request)
|
public function replies(Request $request)
|
||||||
{
|
{
|
||||||
|
// TODO replies
|
||||||
|
throw new NotImplementedException;
|
||||||
$actor_id = Common::ensureLoggedIn()->getId();
|
$actor_id = Common::ensureLoggedIn()->getId();
|
||||||
$notes = DB::dql('select n from App\Entity\Note n '
|
$notes = DB::dql('select n from App\Entity\Note n '
|
||||||
. 'where n.reply_to is not null and n.actor_id = :id '
|
. 'where n.reply_to is not null and n.actor_id = :id '
|
||||||
|
Loading…
Reference in New Issue
Block a user