We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 999b563 commit 3f41ef4Copy full SHA for 3f41ef4
1 file changed
src/decorators/db/index.ts
@@ -11,11 +11,10 @@ export function initGroupSetting() {
11
descriptor.value = async function (...args: any[]) {
12
const ctx: Context = (this as any)?.ctx || args[0];
13
const groupSettingsRepo = new GroupSettingsService();
14
- const groupSettings = await groupSettingsRepo.getByGroupId(ctx.chat?.id!);
+ let groupSettings = await groupSettingsRepo.getByGroupId(ctx.chat?.id!);
15
if (!groupSettings) {
16
- await groupSettingsRepo.init(ctx);
+ groupSettings = await groupSettingsRepo.init(ctx);
17
}
18
-
19
return originalMethod.apply(this, args);
20
};
21
0 commit comments