aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_workspace.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-12-11 19:45:17 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:54 +0100
commit363950616419e0894196df08a47e5b084dcf8db4 (patch)
tree09ce560666ae7e600a696bb75b79cecb935cee2b /slack/slack_workspace.py
parent04df66c2f6c8ec677b8ba34da5627fa91b9bebd7 (diff)
downloadwee-slack-363950616419e0894196df08a47e5b084dcf8db4.tar.gz
Don't return sort_key from _conversation_if_should_open
This originally had to be returned here because it was an async function, but now that it's a sync function this can be simplified.
Diffstat (limited to 'slack/slack_workspace.py')
-rw-r--r--slack/slack_workspace.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/slack/slack_workspace.py b/slack/slack_workspace.py
index 69533d7..762009a 100644
--- a/slack/slack_workspace.py
+++ b/slack/slack_workspace.py
@@ -265,7 +265,9 @@ class SlackWorkspace:
c for c in conversations_if_should_open if c is not None
]
- for _, conversation in sorted(conversations_to_open):
+ for conversation in sorted(
+ conversations_to_open, key=lambda conversation: conversation.sort_key()
+ ):
await conversation.open_buffer()
await gather(
@@ -289,7 +291,7 @@ class SlackWorkspace:
if not history["messages"]:
return
- return conversation.sort_key(), conversation
+ return conversation
async def _connect_ws(self, url: str):
proxy = Proxy()