@@ -19,6 +19,7 @@ def __init__(self, token, connect=True):
1919 self .channels = SearchList ()
2020 self .connected = False
2121 self .pingcounter = 0
22+ self .ws_url = None
2223 self .api_requester = SlackRequest ()
2324
2425 if connect :
@@ -119,13 +120,15 @@ def websocket_safe_read(self):
119120 raise
120121 return data .rstrip ()
121122
122- def attach_user (self , name , id , real_name , tz ):
123- if self .users .find (id ) is None :
124- self .users .append (User (self , name , id , real_name , tz ))
123+ def attach_user (self , name , channel_id , real_name , tz ):
124+ if self .users .find (channel_id ) is None :
125+ self .users .append (User (self , name , channel_id , real_name , tz ))
125126
126- def attach_channel (self , name , id , members = []):
127- if self .channels .find (id ) is None :
128- self .channels .append (Channel (self , name , id , members ))
127+ def attach_channel (self , name , channel_id , members = None ):
128+ if members is None :
129+ members = []
130+ if self .channels .find (channel_id ) is None :
131+ self .channels .append (Channel (self , name , channel_id , members ))
129132
130133 def join_channel (self , name ):
131134 print (self .api_requester .do (self .token ,
0 commit comments