添加 sender_name api

This commit is contained in:
shenjack 2024-08-09 16:15:05 +08:00
parent 585f0ca331
commit 8c52d898ff
Signed by: shenjack
GPG Key ID: 7B1134A979775551
2 changed files with 4 additions and 0 deletions

View File

@ -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() }

View File

@ -4,6 +4,8 @@
- 加入了 禁用/启用 插件功能
- 现在会在插件加载时警告你的插件原来定义了 `CONFIG_DATA` 这一项
- `IcaNewMessage` 添加了新的 api
- `get_sender_name` 获取发送人昵称
## 0.6.10