Appearance
Rule.io SDK / rcml/src / getConfiguredSocialLinks
Function: getConfiguredSocialLinks()
getConfiguredSocialLinks(
links):EmailThemeSocialLink[]
Defined in: rcml/src/email/theme-defaults.ts:97
Filter theme.links to entries the consumer explicitly configured — any slot whose URL still equals the corresponding DEFAULT_LINKS_MAP placeholder (or a placeholder written by an earlier SDK version) is treated as not configured and dropped.
Use this in vendor templates that should not render a social block when the consumer never supplied socials. createEmailTheme always seeds theme.links with the defaults so a naive Object.values(theme.links).length > 0 check is always true.
A legacy 'website' entry (from a theme persisted before the slot was renamed to 'web') is returned as 'web'; entries with an unknown type are ignored.
Edge case: if a consumer happens to set a URL to exactly the default placeholder string (e.g. 'https://facebook.com'), this helper treats it as unconfigured. Real social URLs almost always include a username or path segment, so the false-negative rate is negligible in practice.
Parameters
links
Readonly<Partial<Record<EmailThemeSocialLinkType, EmailThemeSocialLink>>>