Commit cd16d72
fix(company-resolver): honour /clip connect in multi-company setups (#42)
resolveCompanyId() previously called ctx.companies.list({ limit: 1 })
and cached the result globally, ignoring any company explicitly set via
/clip connect. In multi-company instances this caused /clip status,
/clip issues, /clip budget, /clip agents, and job-level resolvers to
always show data for the wrong company.
The fix reads the company_default instance state written by handleConnect
before falling back to list-based resolution. The /clip connect result
is intentionally NOT cached so that switching companies takes effect
immediately without restarting the plugin.
Fixes #31 (command-path variant — escalation button path already fixed by #32).
Co-authored-by: Paperclip <noreply@paperclip.ing>1 parent 561dd0b commit cd16d72
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
10 | 26 | | |
11 | 27 | | |
12 | 28 | | |
| |||
0 commit comments