fix bugs in account.secure_join() and chat.get_fresh_message_count()

This commit is contained in:
adbenitez
2022-11-30 22:36:49 -05:00
parent 53d6807e8d
commit 240b335181
2 changed files with 3 additions and 3 deletions

View File

@@ -61,7 +61,7 @@ class Account:
async def secure_join(self, qr: str) -> Chat:
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):
"""Return the list of fresh messages, newest messages first.

View File

@@ -29,5 +29,5 @@ class Chat:
async def leave(self):
await self.rpc.leave_group(self.account_id, self.chat_id)
async def get_fresh_message_count() -> int:
await get_fresh_msg_cnt(self.account_id, self.chat_id)
async def get_fresh_message_count(self) -> int:
return await self.rpc.get_fresh_msg_cnt(self.account_id, self.chat_id)