Files
outline/shared/utils/integrations.ts
Tom MoorandClaude Opus 5 1936488bba fix: Self-hosted diagrams.net URLs not offered as an embed
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>
2026-08-24 18:23:35 -04:00

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;
}