mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-15 12:40:46 +08:00
fix: improve WhatsApp settings and isolate IM host authentication
Some checks are pending
CI / Test, build, and verify package (push) Waiting to run
Some checks are pending
CI / Test, build, and verify package (push) Waiting to run
This commit is contained in:
parent
bcbe85fdb1
commit
bf73b0c0af
28 changed files with 848 additions and 116 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { modernHarnessApi } from './modern-harness-api.mjs';
|
||||
import { runHarnessHostOperation } from './harness-host-context.mjs';
|
||||
|
||||
function optionalService(ctx, name) {
|
||||
if (ctx && Object.hasOwn(ctx, name)) return ctx[name];
|
||||
|
|
@ -13,6 +14,7 @@ export function harnessConnection(ctx, config = {}) {
|
|||
const apiProxy = optionalService(ctx, 'apiProxy') ?? modernHarnessApi(ctx);
|
||||
return {
|
||||
apiProxy,
|
||||
runHostOperation: (operation) => runHarnessHostOperation(ctx, operation),
|
||||
// Cordis child contexts share one root; different Hosts must not share
|
||||
// ownership of pending questions and approvals.
|
||||
interactionScope: ctx.root ?? ctx,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue