Skip to content

Commit

Permalink
fix: use rest_id to infer article id
Browse files Browse the repository at this point in the history
  • Loading branch information
y-pakorn committed Jan 1, 2025
1 parent 4df69d7 commit d71542a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/timeline-v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export interface SearchResultRaw {

export interface TimelineArticleResultRaw {
id?: string;
rest_id?: string;
title?: string;
preview_text?: string;
cover_media?: {
Expand Down
2 changes: 1 addition & 1 deletion src/timeline-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ export function parseArticle(
.join('\n\n') ?? '';
articles.push({
id,
articleId: article.id || '',
articleId: article.rest_id || '',
coverMediaUrl: article.cover_media?.media_info?.original_img_url,
previewText: article.preview_text || '',
text,
Expand Down

0 comments on commit d71542a

Please sign in to comment.