mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-14 00:53:22 +08:00
Add Telegram and Discord IM channels
This commit is contained in:
parent
7123fce47a
commit
cb74e1c4c7
66 changed files with 8579 additions and 1910 deletions
|
|
@ -5,10 +5,17 @@ export const name = 'dsh-weixin-host';
|
|||
export const inject = ['connection', 'credentials', 'webServer'];
|
||||
|
||||
export async function apply(ctx, config = {}) {
|
||||
if (config?.controller) return installWeixinRpc(ctx, config.controller, config.rpcOptions);
|
||||
if (config?.controller) {
|
||||
return installWeixinRpc(ctx, config.controller, config.rpcOptions, config.rpcAuthority);
|
||||
}
|
||||
|
||||
const production = await createProductionController(ctx, config, config.internals);
|
||||
const disposeRpc = installWeixinRpc(ctx, production.controller, config.rpcOptions);
|
||||
const disposeRpc = installWeixinRpc(
|
||||
ctx,
|
||||
production.controller,
|
||||
config.rpcOptions,
|
||||
config.rpcAuthority,
|
||||
);
|
||||
ctx.effect(() => async () => {
|
||||
await production.close();
|
||||
}, 'dsh-weixin: close account connections');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue