Commit 83efcd5
fix(evolution): prevent Evolution instances from getting stuck in 'close' state (#2420)
Evolution is a webhook-based integration that should always be considered
'open' since it passively receives events. Three changes fix the issue:
1. monitor.service.ts: Always call connectToWhatsapp() for Evolution
instances on server restart, regardless of stored connection status.
2. instance.controller.ts: Call connectToWhatsapp() for Evolution
instances during creation to initialize Chatwoot settings.
3. evolution.channel.service.ts: Restore stateConnection to 'open' and
persist it to DB when connectToWhatsapp() is called in init mode.
Closes #2419
https://claude.ai/code/session_013wxk4cj5U2H5fr2cxCgWdH
Co-authored-by: Claude <noreply@anthropic.com>1 parent 75ae3eb commit 83efcd5
3 files changed
Lines changed: 18 additions & 1 deletion
File tree
- src/api
- controllers
- integrations/channel/evolution
- services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
159 | 163 | | |
160 | 164 | | |
161 | 165 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
118 | 127 | | |
119 | 128 | | |
120 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
297 | 301 | | |
298 | 302 | | |
299 | 303 | | |
| |||
0 commit comments