diff --git a/packages/core/src/session.ts b/packages/core/src/session.ts index 2c3fad583d..afc702471f 100644 --- a/packages/core/src/session.ts +++ b/packages/core/src/session.ts @@ -200,6 +200,7 @@ export class Session(id = this.channelId, fields: K[] = []) { + if (!fields.length) return { platform: this.platform, id } const channel = await this.app.database.getChannel(this.platform, id, fields) if (channel) return channel const assignee = await this.resolveValue(this.app.options.autoAssign) ? this.selfId : '' @@ -233,6 +234,7 @@ export class Session(id = this.userId, fields: K[] = []) { + if (!fields.length) return { [this.platform]: id } const user = await this.app.database.getUser(this.platform, id, fields) if (user) return user const authority = await this.resolveValue(this.app.options.autoAuthorize)