Compare commits

..

No commits in common. "cd67c5b94d432a37bde2e2a6dd1695abbf089402" and "dade195e763ed5902deac2e88466e1489a909068" have entirely different histories.

7 changed files with 9 additions and 23 deletions

2
Cargo.lock generated
View File

@ -659,7 +659,7 @@ dependencies = [
[[package]]
name = "ica-rs"
version = "0.6.7"
version = "0.6.6"
dependencies = [
"anyhow",
"base64 0.22.1",

View File

@ -1,6 +1,6 @@
[package]
name = "ica-rs"
version = "0.6.7"
version = "0.6.6"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -323,8 +323,6 @@ def on_ica_message(msg: IcaNewMessage, client: IcaClient) -> None:
bangbang_img(msg, client)
except: # noqa
report_msg = f"bmcl插件发生错误,请呼叫shenjack\n{traceback.format_exc()}"
if len(report_msg) > 200:
report_msg = report_msg[:200] + "..." # 防止消息过长
reply = msg.reply_with(report_msg)
client.send_and_warn(reply)
@ -366,8 +364,6 @@ def on_tailchat_message(msg, client) -> None:
bangbang_img(msg, client)
except: # noqa
report_msg = f"bmcl插件发生错误,请呼叫shenjack\n{traceback.format_exc()}"
if len(report_msg) > 200:
report_msg = report_msg[:200] + "..." # 防止消息过长
reply = msg.reply_with(report_msg)
client.send_and_warn(reply)

View File

@ -1,4 +1,5 @@
use serde::{Deserialize, Serialize};
use serde_json::Value as JsonValue;
use crate::data_struct::tailchat::UserId;

View File

@ -122,11 +122,10 @@ pub async fn any_event(event: Event, payload: Payload, _client: Client) {
"setAllChatGroups",
// 忽略的
"notify",
"syncRead", // 同步已读
"closeLoading", // 发送消息/加载新聊天 有一个 loading
"renewMessage", // 我也不确定到底是啥事件
"requestSetup", // 需要登录
"updateRoom",
"syncRead", // 同步已读
];
match &event {
Event::Custom(event_name) => {

View File

@ -25,8 +25,8 @@ pub type MainStatus = status::BotStatus;
pub type StopGetter = tokio::sync::oneshot::Receiver<()>;
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub const ICA_VERSION: &str = "1.6.0";
pub const TAILCHAT_VERSION: &str = "1.1.0";
pub const ICA_VERSION: &str = "1.5.0";
pub const TAILCHAT_VERSION: &str = "1.0.0";
#[macro_export]
macro_rules! wrap_callback {

View File

@ -4,8 +4,7 @@ use rust_socketio::{Event, Payload};
use tracing::info;
use crate::data_struct::tailchat::messages::ReciveMessage;
use crate::data_struct::tailchat::status::UpdateDMConverse;
use crate::tailchat::client::{emit_join_room, send_message};
use crate::tailchat::client::send_message;
/// 所有
pub async fn any_event(event: Event, payload: Payload, _client: Client) {
@ -94,19 +93,10 @@ pub async fn on_msg_delete(payload: Payload, _client: Client) {
}
}
pub async fn on_converse_update(payload: Payload, client: Client) {
pub async fn on_converse_update(payload: Payload, _client: Client) {
if let Payload::Text(values) = payload {
if let Some(value) = values.first() {
emit_join_room(&client).await;
let update_info: UpdateDMConverse = match serde_json::from_value(value.clone()) {
Ok(value) => value,
Err(e) => {
info!("tailchat updateDMConverse {}", value.to_string().red());
info!("tailchat updateDMConverse {}", format!("{:?}", e).red());
return;
}
};
info!("更新会话 {}", format!("{:?}", update_info).cyan());
info!("更新会话 {}", value.to_string().green());
}
}
}