allow search public chats

This commit is contained in:
2021-12-11 10:47:07 +08:00
parent 9a021e3c5b
commit 34915a2649
2 changed files with 16 additions and 2 deletions

View File

@@ -445,6 +445,15 @@ class TdLib:
print(f"{re['code']} {re['message']}")
return None
async def searchPublicChats(self, query: str):
re = await self._send({"@type": "searchPublicChats", "query": query})
if re['@type'] == 'chats':
return re
else:
if re['@type'] == 'error':
print(f"{re['code']} {re['message']}")
return None
async def setAuthenticationPhoneNumber(self, phone_number, settings=None):
sett = {"@type": "phoneNumberAuthenticationSettings",
"allow_flash_call": False,