@marshulll/openclaw-wecom 0.1.11 → 0.1.12

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": "@marshulll/openclaw-wecom",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "description": "OpenClaw WeCom channel plugin (intelligent bot + internal app)",
6
6
  "author": "OpenClaw",
@@ -753,6 +753,10 @@ export async function handleWecomBotWebhook(params: {
753
753
  pruneStreams();
754
754
 
755
755
  const { req, res, targets } = params;
756
+ const botTargets = targets.filter((candidate) => shouldHandleBot(candidate.account));
757
+ if (botTargets.length === 0) {
758
+ return false;
759
+ }
756
760
  const query = resolveQueryParams(req);
757
761
  const timestamp = query.get("timestamp") ?? "";
758
762
  const nonce = query.get("nonce") ?? "";
@@ -770,7 +774,7 @@ export async function handleWecomBotWebhook(params: {
770
774
  return false;
771
775
  }
772
776
 
773
- const target = targets.find((candidate) => {
777
+ const target = botTargets.find((candidate) => {
774
778
  if (!shouldHandleBot(candidate.account)) return false;
775
779
  if (!candidate.account.configured || !candidate.account.token) return false;
776
780
  const ok = verifyWecomSignature({
@@ -823,9 +827,9 @@ export async function handleWecomBotWebhook(params: {
823
827
  return true;
824
828
  }
825
829
 
826
- const target = targets.find((candidate) => {
827
- if (!shouldHandleBot(candidate.account)) return false;
828
- if (!candidate.account.token) return false;
830
+ const target = botTargets.find((candidate) => {
831
+ if (!shouldHandleBot(candidate.account)) return false;
832
+ if (!candidate.account.token) return false;
829
833
  const ok = verifyWecomSignature({
830
834
  token: candidate.account.token,
831
835
  timestamp,