feat(channels): emit line and zalo binary attachment fallback notices

This commit is contained in:
William Valentin
2026-02-17 10:36:47 -08:00
parent ac29789d89
commit 2007c0c060
5 changed files with 34 additions and 2 deletions
+3 -1
View File
@@ -81,9 +81,11 @@ describe('ZaloAdapter', () => {
],
});
expect(mockFetch).toHaveBeenCalledTimes(2);
expect(mockFetch).toHaveBeenCalledTimes(3);
const secondBody = JSON.parse(String(mockFetch.mock.calls[1]?.[1]?.body ?? '{}'));
const thirdBody = JSON.parse(String(mockFetch.mock.calls[2]?.[1]?.body ?? '{}'));
expect(secondBody.message?.text).toBe('file.txt: https://example.com/file.txt');
expect(thirdBody.message?.text).toBe('[Zalo] Binary attachment not uploaded yet: attachment (application/pdf).');
expect(warnSpy).toHaveBeenCalledWith('Zalo: skipping attachment data (application/pdf) — upload not implemented');
warnSpy.mockRestore();
});