File tree Expand file tree Collapse file tree
pyrogram/client/types/user_and_chats Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -386,7 +386,6 @@ def set_description(self, description: str) -> bool:
386386 description = description
387387 )
388388
389-
390389 def set_photo (self , photo : str ) -> bool :
391390 """Bound method *set_photo* of :obj:`Chat`.
392391
@@ -688,14 +687,17 @@ def join(self):
688687
689688 chat.join()
690689
690+ Note:
691+ This only works for public groups and channels that have set a username.
692+
691693 Returns:
692694 :obj:`Chat`: On success, a chat object is returned.
693695
694696 Raises:
695697 RPCError: In case of a Telegram RPC error.
696698 """
697699
698- return self ._client .join_chat (self .id )
700+ return self ._client .join_chat (self .username )
699701
700702 def leave (self ):
701703 """Bound method *leave* of :obj:`Chat`.
@@ -716,4 +718,3 @@ def leave(self):
716718 """
717719
718720 return self ._client .leave_chat (self .id )
719-
You can’t perform that action at this time.
0 commit comments