Add Telegram and Discord IM channels

This commit is contained in:
xmanrui 2026-08-16 14:47:16 +08:00
parent 7123fce47a
commit cb74e1c4c7
66 changed files with 8579 additions and 1910 deletions

View file

@ -24,10 +24,17 @@ function controllerFrom(ctx, config) {
*/
export async function apply(ctx, config = {}) {
const controller = controllerFrom(ctx, config);
if (controller) return installFeishuRpc(ctx, controller);
if (controller) {
return installFeishuRpc(ctx, controller, config.rpcOptions, config.rpcAuthority);
}
const production = await createProductionController(ctx, config);
const disposeRpc = installFeishuRpc(ctx, production.controller);
const disposeRpc = installFeishuRpc(
ctx,
production.controller,
config.rpcOptions,
config.rpcAuthority,
);
ctx.effect(() => async () => {
await production.close();
}, 'dsh-feishu: close controller and live connection');