Add LINE channel adapter with webhook ingress and gating
This commit is contained in:
@@ -581,6 +581,33 @@ describe('configSchema — bluebubbles', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('configSchema — line', () => {
|
||||
const minimalConfig = {
|
||||
telegram: { bot_token: 'test', allowed_chat_ids: [1] },
|
||||
models: { default: { provider: 'anthropic', model: 'claude-3' } },
|
||||
};
|
||||
|
||||
it('accepts line config and defaults optional fields', () => {
|
||||
const result = configSchema.parse({
|
||||
...minimalConfig,
|
||||
line: {
|
||||
channel_access_token: 'line-token',
|
||||
channel_secret: 'line-secret',
|
||||
},
|
||||
});
|
||||
|
||||
expect(result.line).toBeDefined();
|
||||
if (!result.line) {
|
||||
throw new Error('Expected line config');
|
||||
}
|
||||
expect(result.line.channel_access_token).toBe('line-token');
|
||||
expect(result.line.channel_secret).toBe('line-secret');
|
||||
expect(result.line.allowed_source_ids).toEqual([]);
|
||||
expect(result.line.require_mention).toBe(true);
|
||||
expect(result.line.mention_name).toBe('flynn');
|
||||
});
|
||||
});
|
||||
|
||||
describe('configSchema — whatsapp', () => {
|
||||
const minimalConfig = {
|
||||
telegram: { bot_token: 'test', allowed_chat_ids: [1] },
|
||||
|
||||
Reference in New Issue
Block a user