diff --git a/proc_qq/Cargo.toml b/proc_qq/Cargo.toml index a96b316..702cba1 100644 --- a/proc_qq/Cargo.toml +++ b/proc_qq/Cargo.toml @@ -14,8 +14,8 @@ proc_qq_codegen = { path = "../proc_qq_codegen" } bytes = "1" tokio = { version = "1", features = ["full"] } tracing = "0.1" -ricq = { git = "https://github.com/lz1998/ricq.git", rev = "5182cb7" } -ricq-core = { git = "https://github.com/lz1998/ricq.git", rev = "5182cb7" } +ricq = { git = "https://github.com/lz1998/ricq.git", branch = "master" } +ricq-core = { git = "https://github.com/lz1998/ricq.git", branch = "master" } anyhow = "1.0" serde = "1.0" serde_json = "1.0" diff --git a/proc_qq/src/client.rs b/proc_qq/src/client.rs index b95fbf8..49d2e6e 100644 --- a/proc_qq/src/client.rs +++ b/proc_qq/src/client.rs @@ -13,6 +13,7 @@ use futures::future::BoxFuture; use futures::FutureExt; use rand::prelude::IteratorRandom; use ricq::ext::common::after_login; +use ricq::qsign::QSignClient; use ricq_core::binary::{BinaryReader, BinaryWriter}; use ricq_core::command::wtlogin::{ LoginDeviceLocked, LoginNeedCaptcha, LoginResponse, LoginSuccess, LoginUnknownStatus, @@ -544,6 +545,7 @@ pub fn bytes_to_token(token: Vec) -> Token { /// 用于构建客户端 pub struct ClientBuilder { + qsign_client: Option>, device_source: DeviceSource, version: &'static Version, authentication: Option, @@ -564,6 +566,7 @@ impl ClientBuilder { // 构造 pub fn new() -> Self { Self { + qsign_client: None, device_source: DeviceSource::default(), version: &ANDROID_PHONE, authentication: None, @@ -657,6 +660,9 @@ impl ClientBuilder { JsonString(json_string) => parse_device_json(json_string)?, }, self.version.clone(), + self.qsign_client + .clone() + .with_context(|| "您必须设置签名服务器")?, ClientHandler { modules: self.modules_vec.clone(), result_handlers: self.result_handlers_vec.clone(),