diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2021-02-20 12:31:58 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2021-02-20 13:24:49 +0100 |
commit | e626714a1acdc13fd711869b879e2db7aa75ace8 (patch) | |
tree | 1fc4298249a72a3ad32ebd0d61a897eddc58ec3a /wee_slack.py | |
parent | 8bd734c8e9a6b133a65548672f8a11ee3b3ce677 (diff) | |
download | wee-slack-e626714a1acdc13fd711869b879e2db7aa75ace8.tar.gz |
Replace deprecated APIs with conversations API
Now that conversations.mark works for all tokens, just using the
conversations API the same way as the old APIs works fine as far as I
can see.
Loosing unread_count_display by replacing mpim.open with
conversations.open and channels.info with conversations.info means that
mpims and channels will not be marked as unread when wee-slack loads if
background_load_all_history has been set to false anymore. As far as I
can see, the only way to check if they have unread messages is by
loading the history, so there is no way around this.
Fixes #792
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/wee_slack.py b/wee_slack.py index a3d779c..77e14ce 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -76,31 +76,31 @@ RECORD_DIR = "/tmp/weeslack-debug" SLACK_API_TRANSLATOR = { "channel": { - "history": "channels.history", + "history": "conversations.history", "join": "conversations.join", "leave": "conversations.leave", - "mark": "channels.mark", - "info": "channels.info", + "mark": "conversations.mark", + "info": "conversations.info", }, "im": { - "history": "im.history", + "history": "conversations.history", "join": "conversations.open", "leave": "conversations.close", - "mark": "im.mark", + "mark": "conversations.mark", }, "mpim": { - "history": "mpim.history", - "join": "mpim.open", # conversations.open lacks unread_count_display + "history": "conversations.history", + "join": "conversations.open", "leave": "conversations.close", - "mark": "mpim.mark", - "info": "groups.info", + "mark": "conversations.mark", + "info": "conversations.info", }, "group": { - "history": "groups.history", + "history": "conversations.history", "join": "conversations.join", "leave": "conversations.leave", - "mark": "groups.mark", - "info": "groups.info" + "mark": "conversations.mark", + "info": "conversations.info" }, "private": { "history": "conversations.history", @@ -113,7 +113,7 @@ SLACK_API_TRANSLATOR = { "history": "conversations.history", "join": "conversations.join", "leave": "conversations.leave", - "mark": "channels.mark", + "mark": "conversations.mark", "info": "conversations.info", }, "thread": { |