mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-22 09:46:42 +02:00
- Remove local JSON storage from matrix-todo-bot and matrix-calendar-bot - Delete TodoService, CalendarService and their modules - Add requireLogin() helper that prompts users to authenticate - All bot commands now require login before any operation - Data is always synced with respective backends (todo-backend, calendar-backend) - Update CLAUDE.md documentation for both bots BREAKING CHANGE: Bots no longer work without authentication Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
35 lines
966 B
TypeScript
35 lines
966 B
TypeScript
import { Module } from '@nestjs/common';
|
|
import { ConfigModule, ConfigService } from '@nestjs/config';
|
|
import { MatrixService } from './matrix.service';
|
|
import {
|
|
TranscriptionModule,
|
|
SessionModule,
|
|
CreditModule,
|
|
CalendarApiService,
|
|
I18nModule,
|
|
} from '@manacore/bot-services';
|
|
|
|
// Factory provider for CalendarApiService
|
|
const calendarApiServiceProvider = {
|
|
provide: CalendarApiService,
|
|
useFactory: (configService: ConfigService) => {
|
|
const baseUrl = configService.get<string>('CALENDAR_BACKEND_URL', 'http://localhost:3014');
|
|
return new CalendarApiService(baseUrl);
|
|
},
|
|
inject: [ConfigService],
|
|
};
|
|
|
|
@Module({
|
|
imports: [
|
|
ConfigModule,
|
|
TranscriptionModule.register({
|
|
sttUrl: process.env.STT_URL || 'http://localhost:3020',
|
|
}),
|
|
SessionModule.forRoot({ storageMode: 'redis' }),
|
|
CreditModule.forRoot(),
|
|
I18nModule.forRoot(),
|
|
],
|
|
providers: [MatrixService, calendarApiServiceProvider],
|
|
exports: [MatrixService],
|
|
})
|
|
export class BotModule {}
|