aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2015-11-20 09:54:23 -0800
committerRyan Huber <rhuber@gmail.com>2015-11-20 09:54:23 -0800
commit589758a790dd05cd564790091e1dec2256b5a668 (patch)
treee7e37267fbc146846955c7ce17ddd61683ab6e5e /wee_slack.py
parent9790e9a4487cf0222c8d3ed857e68e062afa1211 (diff)
downloadwee-slack-589758a790dd05cd564790091e1dec2256b5a668.tar.gz
handle delete
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 2298205..60d72bb 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1217,7 +1217,10 @@ def command_topic(current_buffer, args):
topic = args
if channel:
- async_slack_api_request(server.domain, server.token, 'channels.setTopic', {"channel": channel.identifier, "topic": topic})
+ if topic == "-delete":
+ async_slack_api_request(server.domain, server.token, 'channels.setTopic', {"channel": channel.identifier, "topic": ""})
+ else:
+ async_slack_api_request(server.domain, server.token, 'channels.setTopic', {"channel": channel.identifier, "topic": topic})
return True
else:
return False