From a40da880a7889b5d207398daacc18e4c8caaed11 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Sun, 17 Sep 2023 02:07:36 +0200 Subject: Remove own nick from mpim name and sort names --- slack/slack_conversation.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'slack/slack_conversation.py') 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"] -- cgit