Merge pull request #783 from perdedora/fix-poster-id

fix: wrong poster id for op in api
This commit is contained in:
Lorenzo Yario 2025-03-16 02:59:08 -05:00 committed by GitHub
commit 5f1598367c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -119,8 +119,9 @@ class Api {
$fields = $threadsPage ? self::THREADS_PAGE_FIELDS : $this->postFields;
$this->translateFields($fields, $post, $apiPost);
if (isset($config['poster_ids']) && $config['poster_ids']) {
$apiPost['id'] = poster_id($post->ip, $post->thread, $board['uri']);
$apiPost['id'] = poster_id($post->ip, $post->thread ?? $post->id);
}
if ($threadsPage) {
return $apiPost;