From 8c52d898ffa02ca762e18662ba3d38d28d88205f Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Fri, 9 Aug 2024 16:15:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20sender=5Fname=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ica-rs/src/py/class/ica.rs | 2 ++ news.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ica-rs/src/py/class/ica.rs b/ica-rs/src/py/class/ica.rs index 12eb2bb..e57f3c5 100644 --- a/ica-rs/src/py/class/ica.rs +++ b/ica-rs/src/py/class/ica.rs @@ -93,6 +93,8 @@ impl NewMessagePy { #[getter] pub fn get_sender_id(&self) -> i64 { self.msg.sender_id() } #[getter] + pub fn get_sender_name(&self) -> String { self.msg.sender_name().clone() } + #[getter] pub fn get_is_from_self(&self) -> bool { self.msg.is_from_self() } #[getter] pub fn get_is_reply(&self) -> bool { self.msg.is_reply() } diff --git a/news.md b/news.md index 6600d13..217e3bb 100644 --- a/news.md +++ b/news.md @@ -4,6 +4,8 @@ - 加入了 禁用/启用 插件功能 - 现在会在插件加载时警告你的插件原来定义了 `CONFIG_DATA` 这一项 +- `IcaNewMessage` 添加了新的 api + - `get_sender_name` 获取发送人昵称 ## 0.6.10