aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_conversation.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-09-17 02:07:36 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:54 +0100
commita40da880a7889b5d207398daacc18e4c8caaed11 (patch)
tree9992cfbc551fafb2c06a00ed647575ca214637df /slack/slack_conversation.py
parent9dfb365effd85ef5c852c5f797e4f44e17c98ce9 (diff)
downloadwee-slack-a40da880a7889b5d207398daacc18e4c8caaed11.tar.gz
Remove own nick from mpim name and sort names
Diffstat (limited to 'slack/slack_conversation.py')
-rw-r--r--slack/slack_conversation.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/slack/slack_conversation.py b/slack/slack_conversation.py
index c28c9ec..359c810 100644
--- a/slack/slack_conversation.py
+++ b/slack/slack_conversation.py
@@ -269,9 +269,13 @@ class SlackConversation:
elif self._info["is_mpim"] is True:
members = await self.load_members(load_all=True)
member_users = await gather(
- *(self.workspace.users[user_id] for user_id in members)
+ *(
+ self.workspace.users[user_id]
+ for user_id in members
+ if user_id != self.workspace.my_user.id
+ )
)
- return ",".join([user.nick() for user in member_users])
+ return ",".join(sorted(user.nick() for user in member_users))
else:
return self._info["name"]