diff --git a/app/service/inbox/index.js b/app/service/inbox/index.js index 3d2d9e2..c20b065 100644 --- a/app/service/inbox/index.js +++ b/app/service/inbox/index.js @@ -57,7 +57,7 @@ class InboxService extends Service { const keyword = `%${params.keyword.trim()}%`; where[Op.or] = [ { ext_id: { [Op.like]: keyword } }, - { ref_code: { [Op.like]: keyword } }, + ]; } @@ -215,7 +215,7 @@ class InboxService extends Service { // 查找原消息 const parent = await InboxMessage.findOne({ - where: { id: parentId, warehouse_id: warehouseId }, + where: { id: parentId, warehouse_id: warehouseId, deleted_at: null }, }); if (!parent) { diff --git a/app/service/inbox/receiver.js b/app/service/inbox/receiver.js index 81bab94..828be7f 100644 --- a/app/service/inbox/receiver.js +++ b/app/service/inbox/receiver.js @@ -189,7 +189,6 @@ class InboxReceiverService extends Service { } // 安全边界:校�?target_url - validateTargetUrl(data.target_url); // 幂等检查:ext_id 已存在则直接返回 const exist = await InboxMessage.findOne({ @@ -209,7 +208,6 @@ class InboxReceiverService extends Service { // 推�?body 大小限制(序列化后检查) const pushBody = { - ref_code: data.ref_code || null, ext_data: data.ext_data || null, }; const bodySize = Buffer.byteLength(JSON.stringify(pushBody), 'utf8'); @@ -228,8 +226,6 @@ class InboxReceiverService extends Service { source_extra: data.source_extra || null, target_type: targetType, target_channel: targetChannel, - target_url: data.target_url, - ref_code: data.ref_code || null, ext_data: data.ext_data || null, flags: data.flags || {}, push_status: 0, diff --git a/database/migrations/20260803140000-inbox-remove-url-refcode.js b/database/migrations/20260803140000-inbox-remove-url-refcode.js new file mode 100644 index 0000000..1d16864 --- /dev/null +++ b/database/migrations/20260803140000-inbox-remove-url-refcode.js @@ -0,0 +1 @@ +use strict \ No newline at end of file diff --git a/methods/system.json b/methods/system.json index 59b9c11..984938b 100644 --- a/methods/system.json +++ b/methods/system.json @@ -31980,13 +31980,6 @@ "source": "body", "description": "目标渠道:wecom / dingtalk / feishu / warehouse_api / webhook" }, - { - "name": "targetUrl", - "type": "string", - "required": true, - "source": "body", - "description": "推送目标 URL" - }, { "name": "targetType", "type": "string", @@ -31994,13 +31987,6 @@ "source": "body", "description": "目标类型:im / api / webhook,默认继承原消息的 target_type" }, - { - "name": "refCode", - "type": "string", - "required": false, - "source": "body", - "description": "引用编码,默认继承原消息的 ref_code" - }, { "name": "extData", "type": "object", diff --git a/methods/warehouse.json b/methods/warehouse.json index 7cd2644..8389202 100644 --- a/methods/warehouse.json +++ b/methods/warehouse.json @@ -244,20 +244,6 @@ "source": "body", "description": "目标渠道:wecom / dingtalk / feishu / warehouse_api / webhook" }, - { - "name": "targetUrl", - "type": "string", - "required": true, - "source": "body", - "description": "推送目标 URL(IM Bot webhook 地址 / API 回调地址),仅允许 https://,禁止内网 IP" - }, - { - "name": "refCode", - "type": "string", - "required": false, - "source": "body", - "description": "外部引用编码,推送/回执时原样携带" - }, { "name": "extData", "type": "object",