@@ -345,7 +345,7 @@ async def get_friend_list(self) -> list[BotFriend]:
345345 )
346346
347347 while nextuin_cache :
348- next = GetFriendListRsp .decode (
348+ next : GetFriendListRsp = GetFriendListRsp .decode (
349349 (
350350 await self .send_oidb_svc (
351351 0xFD4 ,
@@ -368,7 +368,7 @@ async def get_friend_list(self) -> list[BotFriend]:
368368 properties .get (27394 ),
369369 )
370370 )
371- if next .next :
371+ if next .next and next . next . uin is not None :
372372 nextuin_cache .append (next .next )
373373
374374 return rsp
@@ -579,13 +579,12 @@ async def get_rkey(self) -> tuple[str, str]:
579579 """
580580 Returns:
581581 rkey:
582- Tuple[str, str]: first is private,second is group
582+ Tuple[str, str]: first is private, second is group
583583 """
584584 body = {
585585 1 : {1 : {1 : 1 , 2 : 202 }, 2 : {101 : 2 , 102 : 1 , 200 : 0 }, 3 : {1 : 2 }},
586586 4 : {1 : [10 , 20 , 2 ]},
587587 }
588588 rsp = await self .send_oidb_svc (0x9067 , 202 , proto_encode (body ), True )
589- a = proto_decode (rsp .data ).proto
590- temp = a [4 ][1 ] # type: ignore
591- return temp [0 ][1 ].decode (), temp [1 ][1 ].decode () # type: ignore
589+ temp = proto_decode (rsp .data ).into ((4 , 1 ), dict [int , list [bytes ]])
590+ return temp [0 ][1 ].decode (), temp [1 ][1 ].decode ()
0 commit comments