fix: bot user id in slack

This commit is contained in:
wangcham
2025-03-30 23:06:03 -04:00
parent 70f8ddb1ba
commit 5744eca37a
+4 -1
View File
@@ -158,7 +158,10 @@ class SlackAdapter(adapter.MessagePlatformAdapter):
], ],
): ):
async def on_message(event:SlackEvent): 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: try:
return await callback( return await callback(
await self.event_converter.target2yiri(event,self.bot),self await self.event_converter.target2yiri(event,self.bot),self