@@ -567,7 +567,7 @@ async def handle_updates(self, updates):
567567
568568 if not isinstance (message , raw .types .MessageEmpty ):
569569 try :
570- diff = await self .send (
570+ diff = await self .invoke (
571571 raw .functions .updates .GetChannelDifference (
572572 channel = await self .resolve_peer (utils .get_channel_id (channel_id )),
573573 filter = raw .types .ChannelMessagesFilter (
@@ -589,7 +589,7 @@ async def handle_updates(self, updates):
589589
590590 self .dispatcher .updates_queue .put_nowait ((update , users , chats ))
591591 elif isinstance (updates , (raw .types .UpdateShortMessage , raw .types .UpdateShortChatMessage )):
592- diff = await self .send (
592+ diff = await self .invoke (
593593 raw .functions .updates .GetDifference (
594594 pts = updates .pts - updates .pts_count ,
595595 date = updates .date ,
@@ -847,14 +847,14 @@ async def get_file(
847847 await session .start ()
848848
849849 for _ in range (3 ):
850- exported_auth = await self .send (
850+ exported_auth = await self .invoke (
851851 raw .functions .auth .ExportAuthorization (
852852 dc_id = dc_id
853853 )
854854 )
855855
856856 try :
857- await session .send (
857+ await session .invoke (
858858 raw .functions .auth .ImportAuthorization (
859859 id = exported_auth .id ,
860860 bytes = exported_auth .bytes
@@ -920,7 +920,7 @@ async def get_file(
920920 file_name = ""
921921
922922 try :
923- r = await session .send (
923+ r = await session .invoke (
924924 raw .functions .upload .GetFile (
925925 location = location ,
926926 offset = offset ,
@@ -958,7 +958,7 @@ async def get_file(
958958 if len (chunk ) < limit :
959959 break
960960
961- r = await session .send (
961+ r = await session .invoke (
962962 raw .functions .upload .GetFile (
963963 location = location ,
964964 offset = offset ,
@@ -986,7 +986,7 @@ async def get_file(
986986 file_name = f .name
987987
988988 while True :
989- r2 = await cdn_session .send (
989+ r2 = await cdn_session .invoke (
990990 raw .functions .upload .GetCdnFile (
991991 file_token = r .file_token ,
992992 offset = offset ,
@@ -996,7 +996,7 @@ async def get_file(
996996
997997 if isinstance (r2 , raw .types .upload .CdnFileReuploadNeeded ):
998998 try :
999- await session .send (
999+ await session .invoke (
10001000 raw .functions .upload .ReuploadCdnFile (
10011001 file_token = r .file_token ,
10021002 request_token = r2 .request_token
@@ -1019,7 +1019,7 @@ async def get_file(
10191019 )
10201020 )
10211021
1022- hashes = await session .send (
1022+ hashes = await session .invoke (
10231023 raw .functions .upload .GetCdnFileHashes (
10241024 file_token = r .file_token ,
10251025 offset = offset
0 commit comments