( choiceExecutor: ChoiceExecutor, parameters: UriParameters, )
| 370 | } |
| 371 | |
| 372 | private applyUriValueParameters( |
| 373 | choiceExecutor: ChoiceExecutor, |
| 374 | parameters: UriParameters, |
| 375 | ): void { |
| 376 | Object.entries(parameters) |
| 377 | .filter(([key]) => key.startsWith("value-")) |
| 378 | .forEach(([key, value]) => { |
| 379 | const variableName = key.slice(6); |
| 380 | // Never let an incoming URI populate a reserved internal variable |
| 381 | // (e.g. the capture-target file path): obsidian:// links are reachable |
| 382 | // by any webpage/app, so honouring `value-__qa.…` would let an external |
| 383 | // caller drive internal plumbing. There is no legitimate URI use for |
| 384 | // these keys. |
| 385 | if ( |
| 386 | variableName && |
| 387 | typeof value === "string" && |
| 388 | !isReservedVariableKey(variableName) |
| 389 | ) { |
| 390 | choiceExecutor.variables.set(variableName, value); |
| 391 | } |
| 392 | }); |
| 393 | } |
| 394 | |
| 395 | private fireUriSuccess(targets: CallbackTargets, file?: TFile): void { |
| 396 | const params: Record<string, string> = { status: "success" }; |
no test coverage detected