File tree Expand file tree Collapse file tree
extensions/thread-ownership Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ type ThreadOwnershipConfig = {
44 forwarderUrl ?: string ;
55 abTestChannels ?: string [ ] ;
66} ;
7+ type LegacyAgentConfig = {
8+ agent ?: {
9+ id ?: string ;
10+ name ?: string ;
11+ } ;
12+ } ;
713
814// In-memory set of {channel}:{thread} keys where this agent was @-mentioned.
915// Entries expire after 5 minutes.
@@ -33,8 +39,9 @@ export default function register(api: OpenClawPluginApi) {
3339 [ ] ,
3440 ) ;
3541
36- const agentId = api . id ?? "unknown" ;
37- const agentName = api . name ?? "" ;
42+ const legacyAgent = ( api . config as LegacyAgentConfig ) . agent ;
43+ const agentId = legacyAgent ?. id ?? api . id ?? "unknown" ;
44+ const agentName = legacyAgent ?. name ?? api . name ?? "" ;
3845 const botUserId = process . env . SLACK_BOT_USER_ID ?? "" ;
3946
4047 // ---------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments