Skip to content

Commit b0d3b34

Browse files
authored
Re-added social accounts back to explore payload (#24455)
closes https://linear.app/ghost/issue/PROD-1771/push-support-for-ghost-explore - The payload for explore was simplified because most properties could be gotten from the public site endpoint - But social accounts are not available there yet - Adding these back to explore, in lieu of adding them to the site endpoint, maybe when we add the other socials - For now, this seems like a simpler change as it feels weird adding "twitter" to an endpont and documenting it, but we haven't entirely decided what to do about that because x is a weird property name
1 parent a686a44 commit b0d3b34

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

ghost/core/core/server/services/explore-ping/ExplorePingService.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ module.exports = class ExplorePingService {
3333
ghost: this.ghostVersion.full,
3434
site_uuid: this.settingsCache.get('site_uuid'),
3535
url: this.config.get('url'),
36-
theme: this.settingsCache.get('active_theme')
36+
theme: this.settingsCache.get('active_theme'),
37+
facebook: this.settingsCache.get('facebook'),
38+
twitter: this.settingsCache.get('twitter')
3739
};
3840

3941
try {

ghost/core/test/unit/server/services/explore-ping/ExplorePingService.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ describe('ExplorePingService', function () {
2323
settingsCacheStub.get.withArgs('active_theme').returns('alto');
2424
settingsCacheStub.get.withArgs('explore_ping').returns(true);
2525
settingsCacheStub.get.withArgs('explore_ping_growth').returns(false);
26+
settingsCacheStub.get.withArgs('facebook').returns('my-profile');
27+
settingsCacheStub.get.withArgs('twitter').returns('my-handle');
2628

2729
configStub = {
2830
get: sinon.stub()
@@ -86,6 +88,8 @@ describe('ExplorePingService', function () {
8688
site_uuid: '123e4567-e89b-12d3-a456-426614174000',
8789
url: 'https://example.com',
8890
theme: 'alto',
91+
facebook: 'my-profile',
92+
twitter: 'my-handle',
8993
posts_total: 100,
9094
posts_last: '2023-01-01T00:00:00.000Z',
9195
posts_first: '2020-01-01T00:00:00.000Z'
@@ -126,6 +130,8 @@ describe('ExplorePingService', function () {
126130
site_uuid: '123e4567-e89b-12d3-a456-426614174000',
127131
url: 'https://example.com',
128132
theme: 'alto',
133+
facebook: 'my-profile',
134+
twitter: 'my-handle',
129135
posts_total: 100,
130136
posts_last: '2023-01-01T00:00:00.000Z',
131137
posts_first: '2020-01-01T00:00:00.000Z',

0 commit comments

Comments
 (0)