Compare commits
No commits in common. "98633aa5ccfdd2d6a3b4043b13421ee20c048f22" and "9d74853d1eab893dfdfb9a18a7a6ef1477fbbffe" have entirely different histories.
98633aa5cc
...
9d74853d1e
@ -43,8 +43,6 @@ impl Room {
|
|||||||
// 手动 patch 一下 roomId
|
// 手动 patch 一下 roomId
|
||||||
// ica issue: https://github.com/Icalingua-plus-plus/Icalingua-plus-plus/issues/793
|
// ica issue: https://github.com/Icalingua-plus-plus/Icalingua-plus-plus/issues/793
|
||||||
if parse_json.get("roomId").is_none_or(|id| id.is_null()) {
|
if parse_json.get("roomId").is_none_or(|id| id.is_null()) {
|
||||||
use tracing::warn;
|
|
||||||
warn!("Room::new_from_json roomId is None, patching it to -1, raw: {:#?}", raw_json);
|
|
||||||
parse_json["roomId"] = JsonValue::Number(Number::from(-1));
|
parse_json["roomId"] = JsonValue::Number(Number::from(-1));
|
||||||
}
|
}
|
||||||
let inner = match serde_json::from_value::<InnerRoom>(parse_json) {
|
let inner = match serde_json::from_value::<InnerRoom>(parse_json) {
|
||||||
|
@ -73,7 +73,7 @@ pub fn version_str() -> String {
|
|||||||
|
|
||||||
/// 是否为稳定版本
|
/// 是否为稳定版本
|
||||||
/// 会在 release 的时候设置为 true
|
/// 会在 release 的时候设置为 true
|
||||||
pub const STABLE: bool = false;
|
pub const STABLE: bool = true;
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! async_callback_with_state {
|
macro_rules! async_callback_with_state {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
use std::time::SystemTime;
|
use std::time::SystemTime;
|
||||||
|
|
||||||
use pyo3::{pyclass, pymethods};
|
use pyo3::prelude::*;
|
||||||
use rust_socketio::asynchronous::Client;
|
use rust_socketio::asynchronous::Client;
|
||||||
use tokio::runtime::Runtime;
|
use tokio::runtime::Runtime;
|
||||||
use tracing::{event, Level};
|
use tracing::{debug, info, warn};
|
||||||
|
|
||||||
use crate::data_struct::ica::messages::{
|
use crate::data_struct::ica::messages::{
|
||||||
DeleteMessage, MessageTrait, NewMessage, ReplyMessage, SendMessage,
|
DeleteMessage, MessageTrait, NewMessage, ReplyMessage, SendMessage,
|
||||||
@ -192,7 +192,7 @@ impl IcaClientPy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn send_and_warn(&self, message: SendMessagePy) -> bool {
|
pub fn send_and_warn(&self, message: SendMessagePy) -> bool {
|
||||||
event!(Level::WARN, message.msg.content);
|
warn!(message.msg.content);
|
||||||
self.send_message(message)
|
self.send_message(message)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,13 +231,13 @@ impl IcaClientPy {
|
|||||||
pub fn get_startup_time(&self) -> SystemTime { crate::MainStatus::get_startup_time() }
|
pub fn get_startup_time(&self) -> SystemTime { crate::MainStatus::get_startup_time() }
|
||||||
|
|
||||||
pub fn debug(&self, content: String) {
|
pub fn debug(&self, content: String) {
|
||||||
event!(Level::DEBUG, "{}", content);
|
debug!("{}", content);
|
||||||
}
|
}
|
||||||
pub fn info(&self, content: String) {
|
pub fn info(&self, content: String) {
|
||||||
event!(Level::INFO, "{}", content);
|
info!("{}", content);
|
||||||
}
|
}
|
||||||
pub fn warn(&self, content: String) {
|
pub fn warn(&self, content: String) {
|
||||||
event!(Level::WARN, "{}", content);
|
warn!("{}", content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user