godprotocol 2.2.66 → 2.2.67

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "godprotocol",
3
- "version": "2.2.66",
3
+ "version": "2.2.67",
4
4
  "description": "A distributed computing environment for Web 4.0 — integrating AI, decentralisation, and virtual computation.",
5
5
  "main": "Index.js",
6
6
  "type": "module",
@@ -136,11 +136,15 @@ class Services {
136
136
 
137
137
  handle_webhook_after = async (req, result) => {
138
138
  let { headers, body, route } = req;
139
- let { xplatform, platform } = headers;
139
+ let { xplatform, third_party, platform } = headers;
140
140
 
141
141
  if (xplatform && xplatform.uri !== platform.uri) {
142
- if (xplatform.webhook?.enabled) {
143
- let { webhook } = xplatform;
142
+ let webhook = third_party?.webhook || xplatform.webhook;
143
+
144
+ if (webhook?.enabled) {
145
+ if (webhook?.routes?.length && !webhook?.routes?.includes(route))
146
+ return;
147
+
144
148
  await fetch(webhook?.url, {
145
149
  method: "POST",
146
150
  headers: {