- Replace direct DiscordService injection with CHAT_PROVIDERS array - Herald broadcasts to ALL active chat providers (Discord, Matrix, future) - Graceful error handling — one provider failure doesn't block others - Skips disconnected providers automatically - Tests verify multi-provider broadcasting behavior - Fix lint: remove unnecessary conditional in matrix.service.ts Refs #382
21 lines
648 B
TypeScript
21 lines
648 B
TypeScript
import { Module } from "@nestjs/common";
|
|
import { HeraldService } from "./herald.service";
|
|
import { PrismaModule } from "../prisma/prisma.module";
|
|
import { BridgeModule } from "../bridge/bridge.module";
|
|
|
|
/**
|
|
* Herald Module - Status broadcasting and notifications
|
|
*
|
|
* Responsibilities:
|
|
* - Subscribe to job events
|
|
* - Format status messages with PDA-friendly language
|
|
* - Route to appropriate channels based on workspace config
|
|
* - Broadcast to ALL active chat providers via CHAT_PROVIDERS token
|
|
*/
|
|
@Module({
|
|
imports: [PrismaModule, BridgeModule],
|
|
providers: [HeraldService],
|
|
exports: [HeraldService],
|
|
})
|
|
export class HeraldModule {}
|