chatwoot-router 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.5.1] - 2026-10-05
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Route on a customer's message as it arrives. Chatwoot's message webhook describes a contact without a `type`
|
|
15
|
+
(`Contact#webhook_data`; users and bots have one), and the router required `type: "contact"`, so it ignored
|
|
16
|
+
every customer message and a new ticket waited for the five-minute sweep.
|
|
17
|
+
|
|
10
18
|
## [0.5.0] - 2026-10-05
|
|
11
19
|
|
|
12
20
|
### Fixed
|
|
@@ -112,7 +120,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
112
120
|
`routing_kind`.
|
|
113
121
|
- The `chatwoot-router-store-config` command and `chatwoot-router/stored-config`, for a configuration in KV.
|
|
114
122
|
|
|
115
|
-
[Unreleased]: https://github.com/Phala-Network/chatwoot-workers/compare/chatwoot-router@0.5.
|
|
123
|
+
[Unreleased]: https://github.com/Phala-Network/chatwoot-workers/compare/chatwoot-router@0.5.1...HEAD
|
|
124
|
+
[0.5.1]: https://github.com/Phala-Network/chatwoot-workers/compare/chatwoot-router@0.5.0...chatwoot-router@0.5.1
|
|
116
125
|
[0.5.0]: https://github.com/Phala-Network/chatwoot-workers/compare/chatwoot-router@0.4.0...chatwoot-router@0.5.0
|
|
117
126
|
[0.4.0]: https://github.com/Phala-Network/chatwoot-workers/compare/chatwoot-router@0.3.0...chatwoot-router@0.4.0
|
|
118
127
|
[0.3.0]: https://github.com/Phala-Network/chatwoot-workers/compare/chatwoot-router@0.2.0...chatwoot-router@0.3.0
|
|
@@ -1281,7 +1281,8 @@ function eventTarget(payload) {
|
|
|
1281
1281
|
...change && (change.previous_value === "pending" || change.current_value === "resolved" || change.current_value === "pending" && change.previous_value !== "resolved") && event.updated_at !== void 0 ? { transition: { status: change.current_value, at: event.updated_at } } : {}
|
|
1282
1282
|
};
|
|
1283
1283
|
}
|
|
1284
|
-
if (event.event === "message_created" && (event.message_type === "incoming" || event.message_type === 0) && !event.private &&
|
|
1284
|
+
if (event.event === "message_created" && (event.message_type === "incoming" || event.message_type === 0) && !event.private && // A contact's webhook data has no `type` (Contact#webhook_data); a user's and a bot's do.
|
|
1285
|
+
(event.sender?.type ?? "contact") === "contact" && event.id !== void 0 && event.conversation) {
|
|
1285
1286
|
return { accountId: event.account.id, conversationId: event.conversation.id };
|
|
1286
1287
|
}
|
|
1287
1288
|
return void 0;
|