@@ -183,7 +183,7 @@ async def send_media(
183
183
async def _upload_media (media ):
184
184
if document :
185
185
force_storage_method = kwargs .get ("secondary_upload" , False )
186
- private_community = None
186
+ private_community = bool ( user_id )
187
187
if community_id :
188
188
community = await self .client .app .get_community (community_id )
189
189
private_community = not community .is_public
@@ -782,8 +782,8 @@ async def search_community_data(
782
782
query : str ,
783
783
community_id : str ,
784
784
filter : Literal [
785
- "MESSAGES " , "MEDIA" , "LINK" , "GROUP" , "CHANNEL" , "MEMBER"
786
- ] = "MESSAGES " ,
785
+ "MESSAGE " , "MEDIA" , "LINK" , "GROUP" , "CHANNEL" , "MEMBER"
786
+ ] = "MESSAGE " ,
787
787
limit : int = 10 ,
788
788
page : int = 0 ,
789
789
) -> Union [List [Message ], List [Group ], List [Channel ], List [SearchResultUser ]]:
@@ -810,7 +810,7 @@ async def search_community_data(
810
810
response = await self .client .get (
811
811
"/v1/search/community-data?{}" .format (urlencode (data ))
812
812
)
813
- if filter in ["MESSAGES " , "MEDIA" , "LINK" ]:
813
+ if filter in ["MESSAGE " , "MEDIA" , "LINK" ]:
814
814
return self .client .build_list (Message , response .data )
815
815
elif filter == "GROUP" :
816
816
return self .client .build_list (Group , response .data )
0 commit comments