Skip to content

Commit

Permalink
[bilibili.space] Recognize and handle RICH_TEXT_NODE_TYPE_VOTE
Browse files Browse the repository at this point in the history
  • Loading branch information
SpriteOvO committed Jan 21, 2025
1 parent 6d43710 commit b9b5002
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/source/platform/bilibili/space.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ mod data {
url: jump_url.clone(),
},
// We treat these nodes as plain text
RichTextNodeKind::Emoji { .. } | RichTextNodeKind::Lottery { .. } => {
PostContentPart::Plain(node.orig_text.clone())
}
RichTextNodeKind::Emoji { .. }
| RichTextNodeKind::Lottery { .. }
| RichTextNodeKind::Vote => PostContentPart::Plain(node.orig_text.clone()),
RichTextNodeKind::Unknown(info) => {
warn!("unexpected bilibili rich text node '{info}'");
PostContentPart::Plain(node.orig_text.clone())
Expand Down Expand Up @@ -363,6 +363,8 @@ mod data {
},
#[serde(rename = "RICH_TEXT_NODE_TYPE_GOODS")]
Goods { jump_url: String },
#[serde(rename = "RICH_TEXT_NODE_TYPE_VOTE")]
Vote,
#[serde(untagged)]
Unknown(json::Value),
}
Expand Down

0 comments on commit b9b5002

Please sign in to comment.