diff options
author | Ryan Huber <rhuber@gmail.com> | 2015-11-20 09:54:23 -0800 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2015-11-20 09:54:23 -0800 |
commit | 589758a790dd05cd564790091e1dec2256b5a668 (patch) | |
tree | e7e37267fbc146846955c7ce17ddd61683ab6e5e | |
parent | 9790e9a4487cf0222c8d3ed857e68e062afa1211 (diff) | |
download | wee-slack-589758a790dd05cd564790091e1dec2256b5a668.tar.gz |
handle delete
-rw-r--r-- | wee_slack.py | 5 |
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 |