Skip to content

Commit 70dc006

Browse files
committed
Merge branch 'rtmClientSign' of https://github.com/weakish/leanengine-node-sdk into weakish-rtmClientSign
2 parents 3d8194c + dccce1b commit 70dc006

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

API.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ LeanEngine 中间件会为这些 Hook 函数检查「Hook 签名」,确保调
189189
* `AV.Cloud.onIMConversationUpdate`
190190
* `AV.Cloud.onIMClientOnline`
191191
* `AV.Cloud.onIMClientOffline`
192+
* `AV.Cloud.onIMClientSign`
192193

193194
LeanEngine 中间件会为这些 Hook 函数检查「Hook 签名」,确保调用者的确是 LeanCloud 或本地调试时的命令行工具。
194195

leanengine.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ export namespace Cloud {
159159
export function onIMConversationUpdate(handler: CloudFunction): void;
160160
export function onIMClientOnline(handler: CloudFunction): void;
161161
export function onIMClientOffline(handler: CloudFunction): void;
162+
export function onIMClientSign(handler: CloudFunction): { result: true | false, error?: string }
162163

163164
export function LeanCloudHeaders(options?: MiddlewareOptions): RequestHandler;
164165
export function CookieSession(options?: CookieSessionOptions): RequestHandler;

lib/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ exports.realtimeHookMapping = {
2323
onIMConversationRemove: '_conversationRemove',
2424
onIMConversationUpdate: '_conversationUpdate',
2525
onIMClientOnline: '_clientOnline',
26-
onIMClientOffline: '_clientOffline'
26+
onIMClientOffline: '_clientOffline',
27+
onIMClientSign: '_rtmClientSign'
2728
};
2829

2930
exports.unauthResp = function(res) {

0 commit comments

Comments
 (0)