补充 room api

This commit is contained in:
shenjack-5600u 2025-04-06 20:22:42 +08:00
parent 86ab23e45d
commit 3ce0e0004d
Signed by: shenjack
GPG Key ID: FDF9864E11C7E79F
2 changed files with 6 additions and 0 deletions

View File

@ -127,6 +127,10 @@ impl IcaRoomPy {
pub fn get_room_name(&self) -> String { self.inner.room_name.clone() } pub fn get_room_name(&self) -> String { self.inner.room_name.clone() }
#[getter] #[getter]
pub fn get_unread_count(&self) -> u64 { self.inner.unread_count } pub fn get_unread_count(&self) -> u64 { self.inner.unread_count }
#[getter]
pub fn get_priority(&self) -> u8 { self.inner.priority }
#[getter]
pub fn get_utime(&self) -> i64 { self.inner.utime }
pub fn is_group(&self) -> bool { self.inner.room_id.is_room() } pub fn is_group(&self) -> bool { self.inner.room_id.is_room() }
pub fn is_chat(&self) -> bool { self.inner.room_id.is_chat() } pub fn is_chat(&self) -> bool { self.inner.room_id.is_chat() }
pub fn new_message_to(&self, content: String) -> SendMessagePy { pub fn new_message_to(&self, content: String) -> SendMessagePy {

View File

@ -18,6 +18,8 @@
- `room_name -> int` 群名 (String) - `room_name -> int` 群名 (String)
- `unread_count -> int` 未读消息数 (u64) - `unread_count -> int` 未读消息数 (u64)
- `priority -> int` 优先级 (u8)
- `utime -> int` 最后活跃时间 (unix sec * 1000)
- `def new_message_to(self, content: str) -> IcaSendMessage` - `def new_message_to(self, content: str) -> IcaSendMessage`
- 用于创建一条指向这个房间的消息 - 用于创建一条指向这个房间的消息