From a39da10cc1a279d82d07dacc5493139535063197 Mon Sep 17 00:00:00 2001 From: Princi Vershwal Date: Tue, 15 Apr 2025 20:02:13 +0530 Subject: [PATCH 1/2] Removed site.changed event for AP --- .../core/server/services/activitypub/ActivityPubService.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ghost/core/core/server/services/activitypub/ActivityPubService.ts b/ghost/core/core/server/services/activitypub/ActivityPubService.ts index 6312802d318..4523503273b 100644 --- a/ghost/core/core/server/services/activitypub/ActivityPubService.ts +++ b/ghost/core/core/server/services/activitypub/ActivityPubService.ts @@ -30,11 +30,6 @@ export class ActivityPubService { target_url: new URL('.ghost/activitypub/webhooks/post/published', this.siteUrl), api_version: 'v5.100.0', secret - }, { - event: 'site.changed', - target_url: new URL('.ghost/activitypub/webhooks/site/changed', this.siteUrl), - api_version: 'v5.100.0', - secret }]; } From b8428062e39eb7ee8d30bd0ee5473f3c578dc046 Mon Sep 17 00:00:00 2001 From: Princi Vershwal Date: Tue, 15 Apr 2025 20:17:58 +0530 Subject: [PATCH 2/2] Updated tests to expect 1 webhook --- .../server/services/activitypub/ActivityPubService.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ghost/core/test/unit/server/services/activitypub/ActivityPubService.test.ts b/ghost/core/test/unit/server/services/activitypub/ActivityPubService.test.ts index 551fd618d17..6488e3d5301 100644 --- a/ghost/core/test/unit/server/services/activitypub/ActivityPubService.test.ts +++ b/ghost/core/test/unit/server/services/activitypub/ActivityPubService.test.ts @@ -108,7 +108,7 @@ describe('ActivityPubService', function () { const webhooks = await knexInstance.select('*').from('webhooks'); - const expectedWebhookCount = 2; + const expectedWebhookCount = 1; const expectedWebhookSecret = 'webhook_secret_baby!!'; const expectedWebhookIntegrationId = 'integration_id'; @@ -154,7 +154,7 @@ describe('ActivityPubService', function () { const webhooks = await knexInstance.select('*').from('webhooks'); - const expectedWebhookCount = 2; + const expectedWebhookCount = 1; const expectedWebhookSecret = 'webhook_secret_baby!!'; const expectedWebhookIntegrationId = 'integration_id'; @@ -213,7 +213,7 @@ describe('ActivityPubService', function () { const webhooks = await knexInstance.select('*').from('webhooks'); - const expectedWebhookCount = 2; + const expectedWebhookCount = 1; const expectedWebhookSecret = 'webhook_secret_baby!!'; const expectedWebhookIntegrationId = 'integration_id';