mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-10 13:10:44 +08:00
Add DingTalk to unified IM plugin
This commit is contained in:
parent
c7b573a7aa
commit
af7e6a2296
14 changed files with 1809 additions and 578 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import { apply as applyDingtalk } from '@xmanrui/dsh-dingtalk';
|
||||
import { apply as applyFeishu } from '@xmanrui/dsh-feishu';
|
||||
import { apply as applyWeixin } from '@xmanrui/dsh-weixin';
|
||||
|
||||
|
|
@ -7,12 +8,14 @@ export const inject = ['connection', 'credentials', 'webServer'];
|
|||
export function createImHostPlugin(internals = {}) {
|
||||
const startFeishu = internals.applyFeishu ?? applyFeishu;
|
||||
const startWeixin = internals.applyWeixin ?? applyWeixin;
|
||||
const startDingtalk = internals.applyDingtalk ?? applyDingtalk;
|
||||
return Object.freeze({
|
||||
name,
|
||||
inject,
|
||||
async apply(ctx, config = {}) {
|
||||
await startFeishu(ctx, config.feishu ?? {});
|
||||
await startWeixin(ctx, config.weixin ?? {});
|
||||
await startDingtalk(ctx, config.dingtalk ?? {});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue