Appearance
Rule.io SDK / rcml/src / getConfiguredSocialLinks
Function: getConfiguredSocialLinks()
getConfiguredSocialLinks(
links):EmailThemeSocialLink[]
Defined in: rcml/src/email/theme-defaults.ts:70
Filter theme.links to entries the consumer explicitly configured — any slot whose URL still equals the corresponding DEFAULT_LINKS_MAP placeholder 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.
Edge case: if a consumer happens to set a URL to exactly the default placeholder string (e.g. 'https://www.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>>>