aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2017-10-11 21:24:04 +0200
committerGitHub <noreply@github.com>2017-10-11 21:24:04 +0200
commit504411f48ebf1c5a6b8679153cca05a642e19d2e (patch)
treeafdd1c1315c2b12efd4289dffd23ba774204f7f0
parent31c7e9acde467b8df8efc319fad1971d387b1361 (diff)
parentd0b6e35805431676e662e77448d50589e42137e3 (diff)
downloadwee-slack-504411f48ebf1c5a6b8679153cca05a642e19d2e.tar.gz
Merge pull request #453 from ericdwang/fix-dm-errors
Fix errors when joining DMs and multiparty DMs
-rw-r--r--wee_slack.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 146f359..2ac50c0 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1286,7 +1286,7 @@ class SlackChannel(object):
if self.type == "im":
if "join" in SLACK_API_TRANSLATOR[self.type]:
- s = SlackRequest(self.team.token, SLACK_API_TRANSLATOR[self.type]["join"], {"user": self.user, "return_im": "true"}, team_hash=self.team.team_hash, channel_identifier=self.identifier)
+ s = SlackRequest(self.team.token, SLACK_API_TRANSLATOR[self.type]["join"], {"user": self.user, "return_im": True}, team_hash=self.team.team_hash, channel_identifier=self.identifier)
self.eventrouter.receive(s)
def destroy_buffer(self, update_remote):
@@ -1624,7 +1624,7 @@ class SlackDMChannel(SlackChannel):
self.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"], {"user": self.user}, team_hash=self.team.team_hash, channel_identifier=self.identifier)
+ s = SlackRequest(self.team.token, SLACK_API_TRANSLATOR[self.type]["join"], {"user": self.user, "return_im": True}, team_hash=self.team.team_hash, channel_identifier=self.identifier)
self.eventrouter.receive(s)
self.create_buffer()
@@ -1675,7 +1675,7 @@ class SlackMPDMChannel(SlackChannel):
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.identifier}, team_hash=self.team.team_hash, channel_identifier=self.identifier)
+ s = SlackRequest(self.team.token, SLACK_API_TRANSLATOR[self.type]["info"], {"channel": self.identifier}, team_hash=self.team.team_hash, channel_identifier=self.identifier)
self.eventrouter.receive(s)
# self.create_buffer()