get account on action

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/1710/head
Maxence Lange 2023-03-31 10:26:33 -01:00
rodzic 1ca33be580
commit d1f495e43d
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -507,7 +507,8 @@ class ApiController extends Controller {
public function statusAction(int $nid, string $act): DataResponse {
try {
$this->initViewer(true);
$item = $this->actionService->action($this->viewer, $nid, $act);
$actor = $this->accountService->getActor($this->viewer->getPreferredUsername());
$item = $this->actionService->action($actor, $nid, $act);
if ($item === null) {
$item = $this->streamService->getStreamByNid($nid);