From 589758a790dd05cd564790091e1dec2256b5a668 Mon Sep 17 00:00:00 2001 From: Ryan Huber Date: Fri, 20 Nov 2015 09:54:23 -0800 Subject: handle delete --- wee_slack.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'wee_slack.py') 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 -- cgit