This commit is contained in:
shenjack 2024-06-05 00:09:08 +08:00
parent 3451424544
commit 79dbebdd4e
Signed by: shenjack
GPG Key ID: 7B1134A979775551
6 changed files with 26 additions and 7 deletions

View File

@ -54,9 +54,9 @@ impl ReciveMessage {
}
/// 回复这条消息
pub fn reply_with(&self, content: &String) -> SendingMessage {
pub fn reply_with(&self, content: &str) -> SendingMessage {
SendingMessage::new(
content.clone(),
content.to_string(),
self.converse_id.clone(),
self.group_id.clone(),
Some(ReplyMeta::from_recive_message(self)),

View File

@ -77,7 +77,7 @@ pub async fn start_ica(config: &IcaConfig, stop_reciver: StopGetter) -> ClientRe
rust_socketio::Error::IncompleteResponseFromEngineIo(inner_e) => {
if inner_e.to_string().contains("AlreadyClosed") {
event!(Level::INFO, "socketio client stopped");
return Ok(());
Ok(())
} else {
event!(Level::ERROR, "socketio client stopped with error: {:?}", inner_e);
Err(IcaError::SocketIoError(

View File

@ -2,7 +2,7 @@ use std::path::PathBuf;
use pyo3::prelude::*;
use rust_socketio::asynchronous::Client;
use tracing::{debug, info, warn};
use tracing::{info, warn};
use crate::data_struct::{ica, tailchat};
use crate::error::PyPluginError;
@ -174,7 +174,7 @@ pub async fn tailchat_new_message_py(message: &tailchat::messages::ReciveMessage
let plugins = PyStatus::get_files();
for (path, plugin) in plugins.iter() {
let msg = class::tailchat::TailchatReciveMessagePy::from_recive_message(&message);
let msg = class::tailchat::TailchatReciveMessagePy::from_recive_message(message);
let client = class::tailchat::TailchatClientPy::new(client);
let args = (msg, client);
call_py_func!(args, plugin, path, TAILCHAT_NEW_MESSAGE_FUNC, client);

View File

@ -6,7 +6,7 @@ use md5::{Digest, Md5};
use reqwest::ClientBuilder as reqwest_ClientBuilder;
use rust_socketio::asynchronous::{Client, ClientBuilder};
use rust_socketio::{Event, Payload, TransportType};
use serde_json::{from_str, from_value, json, Value};
use serde_json::{json, Value};
use tracing::{event, span, Level};
use crate::config::TailchatConfig;

View File

@ -5,7 +5,7 @@ use rust_socketio::asynchronous::Client;
use colored::Colorize;
use serde_json::Value;
use tracing::{debug, info, span, warn, Level};
use tracing::{debug, warn};
pub async fn send_message(client: &Client, message: &SendingMessage) -> bool {
let value: Value = message.as_value();

19
news.md
View File

@ -1,5 +1,24 @@
# 更新日志
## 0.6.6
游学之前最后一次更新
其实也就五天
正式支持了 tailchat 端
好耶!
[!note]
```text
notice_room = []
notice_start = true
admin_list = []
filter_list = []
```
的功能暂时不支持
## 0.6.5
怎么就突然 0.6.5 了