From 5744eca37aea004157b49898643aeb2f15ef4510 Mon Sep 17 00:00:00 2001 From: wangcham Date: Sun, 30 Mar 2025 23:06:03 -0400 Subject: [PATCH] fix: bot user id in slack --- pkg/platform/sources/slack.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/platform/sources/slack.py b/pkg/platform/sources/slack.py index 8101e5c5..2e71defc 100644 --- a/pkg/platform/sources/slack.py +++ b/pkg/platform/sources/slack.py @@ -158,7 +158,10 @@ class SlackAdapter(adapter.MessagePlatformAdapter): ], ): async def on_message(event:SlackEvent): - self.bot_account_id = "SlackBot" + if self.bot.bot_user_id: + self.bot_account_id = self.bot.bot_user_id + else: + self.bot_account_id = 'SlackBot' try: return await callback( await self.event_converter.target2yiri(event,self.bot),self