diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2020-05-30 12:22:45 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2020-06-04 21:40:59 +0200 |
commit | a3c377ad044d7e643033273a516296d8cce03920 (patch) | |
tree | 2fbdf7445be3e7ae65956578e78855e258a1b899 /wee_slack.py | |
parent | c6b8825659d686b0e9962044a00b6f15644ab326 (diff) | |
download | wee-slack-a3c377ad044d7e643033273a516296d8cce03920.tar.gz |
Only mark subscribed threads as read
Slack doesn't support marking unsubscribed thread as read (it responds
`message_not_found`).
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py index 77a7694..1b9e67b 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -2452,6 +2452,8 @@ class SlackThreadChannel(SlackChannelCommon): return styles[style] def mark_read(self, ts=None, update_remote=True, force=False, post_data={}): + if not self.parent_message.subscribed: + return args = {"thread_ts": self.thread_ts} args.update(post_data) super(SlackThreadChannel, self).mark_read(ts=ts, update_remote=update_remote, force=force, post_data=args) |