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