From b349cdf4afbd81242906e21030698aae73d7dca6 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sun, 12 May 2024 20:00:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E6=98=AF=E5=9C=A8new=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=E5=8E=BB=E6=8E=89=20sticker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 2 +- ica-rs/Cargo.toml | 2 +- ica-rs/src/data_struct/ica/messages.rs | 6 +++--- ica-rs/src/ica.rs | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e179f32..7c49ee1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -653,7 +653,7 @@ dependencies = [ [[package]] name = "ica-rs" -version = "0.6.2" +version = "0.6.3" dependencies = [ "anyhow", "base64 0.22.1", diff --git a/ica-rs/Cargo.toml b/ica-rs/Cargo.toml index dcb38bb..3666af5 100644 --- a/ica-rs/Cargo.toml +++ b/ica-rs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ica-rs" -version = "0.6.2" +version = "0.6.3" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/ica-rs/src/data_struct/ica/messages.rs b/ica-rs/src/data_struct/ica/messages.rs index fc843c3..271182a 100644 --- a/ica-rs/src/data_struct/ica/messages.rs +++ b/ica-rs/src/data_struct/ica/messages.rs @@ -275,7 +275,7 @@ impl NewMessage { /// 创建一条对这条消息的回复 pub fn reply_with(&self, content: &String) -> SendMessage { - SendMessage::new(content.clone(), self.room_id, Some(self.msg.as_reply()), false) + SendMessage::new(content.clone(), self.room_id, Some(self.msg.as_reply())) } /// 作为被删除的消息 @@ -314,7 +314,6 @@ impl SendMessage { content: String, room_id: RoomId, reply_to: Option, - sticker: bool, ) -> Self { Self { content, @@ -322,7 +321,7 @@ impl SendMessage { reply_to, at: json!([]), file_data: None, - sticker, + sticker: false, } } @@ -341,6 +340,7 @@ impl SendMessage { } } +/// 被删除的消息 #[derive(Debug, Clone, Serialize, Deserialize)] pub struct DeleteMessage { #[serde(rename = "roomId")] diff --git a/ica-rs/src/ica.rs b/ica-rs/src/ica.rs index f01bbc7..0847297 100644 --- a/ica-rs/src/ica.rs +++ b/ica-rs/src/ica.rs @@ -51,7 +51,6 @@ pub async fn start_ica(config: &IcaConfig, stop_reciver: StopGetter) -> ClientRe format!("shenbot v {}\nica-async-rs v{}", crate::VERSION, crate::ICA_VERSION), *room, None, - false, ); tokio::time::sleep(std::time::Duration::from_secs(1)).await;