Skip to content

Commit dccce1b

Browse files
committed
feat: onIMClientSign
1 parent cda5d86 commit dccce1b

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

API.md

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

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

leanengine.d.ts

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

162163
export function LeanCloudHeaders(options?: MiddlewareOptions): RequestHandler;
163164
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)