mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Added blog domain for default support address
no issue - Members site data was not appending blog domain for default support address which is `noreply` - The change allows Portal to use default support address correctly
This commit is contained in:
parent
ff2d9ebdfd
commit
49abeaf398
1 changed files with 7 additions and 2 deletions
|
@ -90,7 +90,12 @@ const updateMemberData = async function (req, res) {
|
||||||
|
|
||||||
const getMemberSiteData = async function (req, res) {
|
const getMemberSiteData = async function (req, res) {
|
||||||
const isStripeConfigured = membersService.config.isStripeConnected();
|
const isStripeConfigured = membersService.config.isStripeConnected();
|
||||||
|
const domain = urlUtils.urlFor('home', true).match(new RegExp('^https?://([^/:?#]+)(?:[/:?#]|$)', 'i'));
|
||||||
|
const blogDomain = domain && domain[1];
|
||||||
|
let supportAddress = settingsCache.get('members_support_address');
|
||||||
|
if (!supportAddress.includes('@')) {
|
||||||
|
supportAddress = `${supportAddress}@${blogDomain}`;
|
||||||
|
}
|
||||||
const response = {
|
const response = {
|
||||||
title: settingsCache.get('title'),
|
title: settingsCache.get('title'),
|
||||||
description: settingsCache.get('description'),
|
description: settingsCache.get('description'),
|
||||||
|
@ -108,7 +113,7 @@ const getMemberSiteData = async function (req, res) {
|
||||||
portal_button_icon: settingsCache.get('portal_button_icon'),
|
portal_button_icon: settingsCache.get('portal_button_icon'),
|
||||||
portal_button_signup_text: settingsCache.get('portal_button_signup_text'),
|
portal_button_signup_text: settingsCache.get('portal_button_signup_text'),
|
||||||
portal_button_style: settingsCache.get('portal_button_style'),
|
portal_button_style: settingsCache.get('portal_button_style'),
|
||||||
members_support_address: settingsCache.get('members_support_address')
|
members_support_address: supportAddress
|
||||||
};
|
};
|
||||||
|
|
||||||
// accent_color is currently an experimental feature
|
// accent_color is currently an experimental feature
|
||||||
|
|
Loading…
Reference in a new issue