mirror of
https://github.com/outline/outline.git
synced 2026-11-21 05:24:03 +03:00
The settings screen stores the installation url nested under the service name, while the embed matcher read a flat url, so a configured instance never matched. The server-side embeddability check also had no knowledge of team integrations and fell back to inspecting the instance headers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
16 lines
568 B
TypeScript
16 lines
568 B
TypeScript
import type { IntegrationSettings, IntegrationType } from "../types";
|
|
|
|
/**
|
|
* Returns the url of the custom installation configured for an embed
|
|
* integration. Settings are stored nested under the service name, or flat for
|
|
* services that predate nesting.
|
|
*
|
|
* @param settings the embed integration settings.
|
|
* @returns the installation url, or undefined when none is configured.
|
|
*/
|
|
export function getInstallationUrl(
|
|
settings: IntegrationSettings<IntegrationType.Embed> | undefined
|
|
): string | undefined {
|
|
return settings?.diagrams?.url ?? settings?.url;
|
|
}
|