diff --git a/client-protocol/Chat.ts b/client-protocol/Chat.ts index 375bb84..4fc9d1b 100644 --- a/client-protocol/Chat.ts +++ b/client-protocol/Chat.ts @@ -19,6 +19,11 @@ export default class Chat extends BaseClientObject { * 实例化方法 * ================================================ */ + static getForInvokeOnlyById(client: LingChairClient, id: string) { + return new Chat(client, { + id + } as ChatBean) + } static async getById(client: LingChairClient, id: string) { try { return await this.getByIdOrThrow(client, id) diff --git a/client-protocol/User.ts b/client-protocol/User.ts index 216a999..7a1f36c 100644 --- a/client-protocol/User.ts +++ b/client-protocol/User.ts @@ -14,10 +14,15 @@ export default class User extends BaseClientObject { * 实例化方法 * ================================================ */ + static getForInvokeOnlyById(client: LingChairClient, id: string) { + return new User(client, { + id + } as UserBean) + } static async getById(client: LingChairClient, id: string) { try { return await this.getByIdOrThrow(client, id) - } catch(_) { + } catch (_) { return null } }