feat(reliability): close messaging gateway P0 gaps

This commit is contained in:
wmq
2026-08-01 23:55:41 +08:00
parent 00b0ebb775
commit ad126606f9
15 changed files with 544 additions and 41 deletions
@@ -159,10 +159,12 @@ describe('Business service behavior', () => {
});
it('persists Telegram broadcast channels as channel instead of supergroup', async () => {
let stored: any;
const repo = {
findOne: jest.fn().mockResolvedValue(null),
create: jest.fn((value) => value),
save: jest.fn(async (value) => value),
upsert: jest.fn(async (value) => { stored = value; }),
findOneOrFail: jest.fn(async () => stored),
};
const service = new TgChatsService(repo as any, tdlib as any, accounts as any);
const saved = await (service as any).persistTdlibChat('account-1', {