aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorAidan Epstein <aidan@jmad.org>2020-03-26 08:02:20 -0700
committerAidan Epstein <aidan@jmad.org>2020-03-26 08:02:20 -0700
commitc361259e2dc5bf105d382faa8cf6dcf78b57ccf2 (patch)
tree2e26b5289aa461fcf2cc6c696083eaffe03e8199 /wee_slack.py
parent2ed2e81d3a46366080cc4e829d9d0b58d7c9aaf4 (diff)
downloadwee-slack-c361259e2dc5bf105d382faa8cf6dcf78b57ccf2.tar.gz
Improve handling of thread/subscription errors.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/wee_slack.py b/wee_slack.py
index b61bb4c..2f88440 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -2881,6 +2881,21 @@ def handle_reactionsremove(json, eventrouter, team, channel, metadata):
print_error("Couldn't remove reaction {}: {}".format(metadata['reaction'], json['error']))
+def handle_subscriptionsthreadmark(json, eventrouter, team, channel, metadata):
+ if not json["ok"]:
+ print_error("Couldn't set thread read status: {}", json['error'])
+
+
+def handle_subscriptionsthreadadd(json, eventrouter, team, channel, metadata):
+ if not json["ok"]:
+ print_error("Couldn't add thread subscription: {}", json['error'])
+
+
+def handle_subscriptionsthreadremove(json, eventrouter, team, channel, metadata):
+ if not json["ok"]:
+ print_error("Couldn't remove thread subscription: {}", json['error'])
+
+
###### New/converted process_ and subprocess_ methods
def process_hello(message_json, eventrouter, team, channel, metadata):
team.subscribe_users_presence()
@@ -4177,11 +4192,6 @@ def command_unsubscribe(data, current_buffer, args):
command_unsubscribe.completion = '%(threads)'
-def handle_subscriptionsthreadmark(json, eventrouter, team, channel, metadata):
- dbg(repr(json))
- if not json["ok"]: w.prnt('', 'Failed to set subscription status. Check debug log for details.')
-
-
@slack_buffer_required
@utf8_decode
def command_reply(data, current_buffer, args):