From 4ef99aaa9ec9517859ae20f133f67af0ff39816e Mon Sep 17 00:00:00 2001 From: mazhe-nerd <106217973+mazhe-nerd@users.noreply.github.com> Date: Wed, 10 Apr 2024 16:38:33 +0800 Subject: [PATCH] feat: new message card verification (#82) --- dispatcher/request-handle.ts | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dispatcher/request-handle.ts b/dispatcher/request-handle.ts index a75fcaa..0dcce88 100644 --- a/dispatcher/request-handle.ts +++ b/dispatcher/request-handle.ts @@ -66,6 +66,14 @@ export default class RequestHandle { } checkIsCardEventValidated(data: any): boolean { + /** + * 1. new message card encrypt ('encrypt' in data) + * 2. new message card but not encrypt ('schema' in data) + */ + if ('encrypt' in data || 'schema' in data) { + return this.checkIsEventValidated(data); + } + const { 'x-lark-request-timestamp': timestamp, 'x-lark-request-nonce': nonce, diff --git a/package.json b/package.json index 8d43ef6..5e5f2ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@larksuiteoapi/node-sdk", - "version": "1.26.0", + "version": "1.27.0", "description": "larksuite open sdk for nodejs", "keywords": [ "feishu",