aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2017-02-03 08:22:04 -0800
committerRyan Huber <rhuber@gmail.com>2017-02-03 08:22:04 -0800
commit863b1a5a2853d945187870a62cfa4d22685ebf05 (patch)
treef4d31fc5ef9c4e1799ea25e81b545a78835eec11
parent60541c7be2af2e9a7af5fe4989301faebbb17229 (diff)
downloadwee-slack-863b1a5a2853d945187870a62cfa4d22685ebf05.tar.gz
open needs work
-rw-r--r--wee_slack.py12
1 files changed, 11 insertions, 1 deletions
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: