@@ -183,7 +183,7 @@ async def send_media(
183183 async def _upload_media (media ):
184184 if document :
185185 force_storage_method = kwargs .get ("secondary_upload" , False )
186- private_community = None
186+ private_community = bool ( user_id )
187187 if community_id :
188188 community = await self .client .app .get_community (community_id )
189189 private_community = not community .is_public
@@ -782,8 +782,8 @@ async def search_community_data(
782782 query : str ,
783783 community_id : str ,
784784 filter : Literal [
785- "MESSAGES " , "MEDIA" , "LINK" , "GROUP" , "CHANNEL" , "MEMBER"
786- ] = "MESSAGES " ,
785+ "MESSAGE " , "MEDIA" , "LINK" , "GROUP" , "CHANNEL" , "MEMBER"
786+ ] = "MESSAGE " ,
787787 limit : int = 10 ,
788788 page : int = 0 ,
789789 ) -> Union [List [Message ], List [Group ], List [Channel ], List [SearchResultUser ]]:
@@ -810,7 +810,7 @@ async def search_community_data(
810810 response = await self .client .get (
811811 "/v1/search/community-data?{}" .format (urlencode (data ))
812812 )
813- if filter in ["MESSAGES " , "MEDIA" , "LINK" ]:
813+ if filter in ["MESSAGE " , "MEDIA" , "LINK" ]:
814814 return self .client .build_list (Message , response .data )
815815 elif filter == "GROUP" :
816816 return self .client .build_list (Group , response .data )
0 commit comments