mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
fix bugs in account.secure_join() and chat.get_fresh_message_count()
This commit is contained in:
@@ -61,7 +61,7 @@ class Account:
|
|||||||
|
|
||||||
async def secure_join(self, qr: str) -> Chat:
|
async def secure_join(self, qr: str) -> Chat:
|
||||||
chat_id = await self.rpc.secure_join(self.account_id, qr)
|
chat_id = await self.rpc.secure_join(self.account_id, qr)
|
||||||
return Chat(self.rpc, self.account_id, self.chat_id)
|
return Chat(self.rpc, self.account_id, chat_id)
|
||||||
|
|
||||||
async def get_fresh_messages(self):
|
async def get_fresh_messages(self):
|
||||||
"""Return the list of fresh messages, newest messages first.
|
"""Return the list of fresh messages, newest messages first.
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ class Chat:
|
|||||||
async def leave(self):
|
async def leave(self):
|
||||||
await self.rpc.leave_group(self.account_id, self.chat_id)
|
await self.rpc.leave_group(self.account_id, self.chat_id)
|
||||||
|
|
||||||
async def get_fresh_message_count() -> int:
|
async def get_fresh_message_count(self) -> int:
|
||||||
await get_fresh_msg_cnt(self.account_id, self.chat_id)
|
return await self.rpc.get_fresh_msg_cnt(self.account_id, self.chat_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user