kopia lustrzana https://github.com/nextcloud/social
filter out of range ancestor
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/1712/head
rodzic
14942d9668
commit
c38073cb2b
|
@ -355,7 +355,6 @@ class StreamService {
|
||||||
* @param int $nid
|
* @param int $nid
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
* @throws StreamNotFoundException
|
|
||||||
*/
|
*/
|
||||||
public function getContextByNid(int $nid): array {
|
public function getContextByNid(int $nid): array {
|
||||||
$curr = $post = $this->streamRequest->getStreamByNid($nid);
|
$curr = $post = $this->streamRequest->getStreamByNid($nid);
|
||||||
|
@ -366,9 +365,13 @@ class StreamService {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$curr = $this->streamRequest->getStreamById($curr->getInReplyTo());
|
try {
|
||||||
$curr->setExportFormat(ACore::FORMAT_LOCAL);
|
$curr = $this->streamRequest->getStreamById($curr->getInReplyTo(), true);
|
||||||
$ancestors[] = $curr;
|
$curr->setExportFormat(ACore::FORMAT_LOCAL);
|
||||||
|
$ancestors[] = $curr;
|
||||||
|
} catch (StreamNotFoundException $e) {
|
||||||
|
break; // ancestor might be out of range for viewer
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
Ładowanie…
Reference in New Issue