Skip to content

Commit

Permalink
fix: update url-track-cleaner to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fython committed Apr 22, 2024
1 parent 02b95ed commit 5776641
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ tokio = { version = "1.37", features = ["rt-multi-thread", "macros"] }
dashmap = "5.5.3"
chrono = "0.4.34"
once_cell = "1.19.0"
url-track-cleaner = "0.1.3"
url-track-cleaner = "0.1.5"
anyhow = "1.0.82"
linkify = "0.10.0"
8 changes: 4 additions & 4 deletions src/urlenhance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ pub(crate) async fn handle_clean_url_cmd(
cmd: CleanUrlCommand,
) -> ResponseResult<()> {
if let Some(replied) = &msg.reply_to_message().cloned() {
if let Some(text) = replied.text() {
return handle_clean_urls_in_text(bot, msg, text.clone()).await;
return if let Some(text) = replied.text() {
handle_clean_urls_in_text(bot, msg, text).await
} else {
bot.send_message(msg.chat.id, "无法处理此消息")
.reply_to_message_id(msg.id)
.await?;
return Ok(());
}
Ok(())
};
}
if cmd.url.is_empty() {
bot.send_message(msg.chat.id, "URL 不能为空")
Expand Down

0 comments on commit 5776641

Please sign in to comment.