From 863b1a5a2853d945187870a62cfa4d22685ebf05 Mon Sep 17 00:00:00 2001 From: Ryan Huber Date: Fri, 3 Feb 2017 08:22:04 -0800 Subject: open needs work --- wee_slack.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/wee_slack.py b/wee_slack.py index 1dc44d8..f691842 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -698,7 +698,17 @@ class SlackChannel(object): def update_from_message_json(self, message_json): for key, value in message_json.items(): setattr(self, key, value) - def open(self): + def open(self, update_remote=True): + self.create_buffer() + #self.active = True + self.get_history() + if "info" in SLACK_API_TRANSLATOR[self.type]: + s = SlackRequest(self.team.token, SLACK_API_TRANSLATOR[self.type]["info"], {"name": self.slack_name}, team_hash=self.team.team_hash, channel_identifier=self.identifier) + EVENTROUTER.receive(s) + if update_remote: + if "join" in SLACK_API_TRANSLATOR[self.type]: + s = SlackRequest(self.team.token, SLACK_API_TRANSLATOR[self.type]["join"], {"name": self.slack_name}, team_hash=self.team.team_hash, channel_identifier=self.identifier) + EVENTROUTER.receive(s) self.create_buffer() def open_if_we_should(self, force=False): try: -- cgit