Skip to content

Commit

Permalink
[bilibili.space] Recognize and handle RICH_TEXT_NODE_TYPE_GOODS
Browse files Browse the repository at this point in the history
  • Loading branch information
SpriteOvO committed Jan 19, 2025
1 parent 3cf6bd9 commit f19aec8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/source/platform/bilibili/space.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ mod data {
))
}
}
RichTextNodeKind::Goods { jump_url } => PostContentPart::Link {
display: node.text.clone(),
url: jump_url.clone(),
},
// We treat these nodes as plain text
RichTextNodeKind::Emoji { .. } | RichTextNodeKind::Lottery { .. } => {
PostContentPart::Plain(node.orig_text.clone())
Expand Down Expand Up @@ -357,6 +361,8 @@ mod data {
pics: Vec<RichTextNodeViewPicturePic>,
rid: String,
},
#[serde(rename = "RICH_TEXT_NODE_TYPE_GOODS")]
Goods { jump_url: String },
#[serde(untagged)]
Unknown(json::Value),
}
Expand Down

0 comments on commit f19aec8

Please sign in to comment.