From d9ea7b56df45f5363dcc0009647de82d495a3eca Mon Sep 17 00:00:00 2001 From: Nathan Lisgo Date: Tue, 16 Jul 2024 17:32:23 +0100 Subject: [PATCH 1/3] feat(README.md): add demo information for Digital Litmus --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9764d8cab..286992e7c 100644 --- a/README.md +++ b/README.md @@ -143,3 +143,5 @@ Unsubscribe/optout interface: - Visit http://localhost:8080/content-alerts/optout/red to trigger something went wrong scenario To work on the integration with CiviCRM you will have to set the environment variable `APP_ENV=prod`. And also adjust the values in `.docker/parameters.yml` for `crm_api_key`, `crm_api_site_key`, `google_api_client.refresh_token` and `google_api_client.optout_unsubscribe_spreadsheet_id` to be the same as in production. + +DEMO FOR DIGITAL LITMUS From 7d560dd931cd49c3168f61611ec4b6d41735308e Mon Sep 17 00:00:00 2001 From: Nathan Lisgo Date: Tue, 16 Jul 2024 22:44:44 +0100 Subject: [PATCH 2/3] feat: update group IDs in MockCiviCrmClient Updated the group ID arrays for 'green@example.com' and 'amber@example.com' in the MockCiviCrmClient. Now 'green@example.com' includes the ElifeNewsletter group ID and 'amber@example.com' includes the EarlyCareer group ID. --- src/Guzzle/MockCiviCrmClient.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Guzzle/MockCiviCrmClient.php b/src/Guzzle/MockCiviCrmClient.php index a3cdd880b..daa8dc5d7 100644 --- a/src/Guzzle/MockCiviCrmClient.php +++ b/src/Guzzle/MockCiviCrmClient.php @@ -3,6 +3,7 @@ namespace eLife\Journal\Guzzle; use eLife\CiviContacts\Etoc\EarlyCareer; +use eLife\CiviContacts\Etoc\ElifeNewsletter; use eLife\CiviContacts\Etoc\LatestArticles; use eLife\CiviContacts\Etoc\Newsletter; use eLife\CiviContacts\Etoc\Subscription; @@ -93,7 +94,7 @@ private function presetsCheckSubscription(string $identifier, bool $isEmail = tr 'green@example.com', 'Green', 'Example', - [LatestArticles::GROUP_ID], + [LatestArticles::GROUP_ID, ElifeNewsletter::GROUP_ID], 'http://localhost/content-alerts/green' ); case '/content-alerts/amber' === $identifier && !$isEmail: @@ -106,7 +107,7 @@ private function presetsCheckSubscription(string $identifier, bool $isEmail = tr 'amber@example.com', 'Amber', 'Example', - [] + [EarlyCareer::GROUP_ID] ); case '/content-alerts/red' === $identifier && !$isEmail: case strpos($identifier, '/content-alerts/unsubscribe/red') !== false && !$isEmail: From f4e4d8c810563dd03b378bb802b6a65d823f3751 Mon Sep 17 00:00:00 2001 From: Nathan Lisgo Date: Tue, 16 Jul 2024 23:15:11 +0100 Subject: [PATCH 3/3] Revert "feat: update group IDs in MockCiviCrmClient" This reverts commit 7d560dd931cd49c3168f61611ec4b6d41735308e. --- src/Guzzle/MockCiviCrmClient.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Guzzle/MockCiviCrmClient.php b/src/Guzzle/MockCiviCrmClient.php index daa8dc5d7..a3cdd880b 100644 --- a/src/Guzzle/MockCiviCrmClient.php +++ b/src/Guzzle/MockCiviCrmClient.php @@ -3,7 +3,6 @@ namespace eLife\Journal\Guzzle; use eLife\CiviContacts\Etoc\EarlyCareer; -use eLife\CiviContacts\Etoc\ElifeNewsletter; use eLife\CiviContacts\Etoc\LatestArticles; use eLife\CiviContacts\Etoc\Newsletter; use eLife\CiviContacts\Etoc\Subscription; @@ -94,7 +93,7 @@ private function presetsCheckSubscription(string $identifier, bool $isEmail = tr 'green@example.com', 'Green', 'Example', - [LatestArticles::GROUP_ID, ElifeNewsletter::GROUP_ID], + [LatestArticles::GROUP_ID], 'http://localhost/content-alerts/green' ); case '/content-alerts/amber' === $identifier && !$isEmail: @@ -107,7 +106,7 @@ private function presetsCheckSubscription(string $identifier, bool $isEmail = tr 'amber@example.com', 'Amber', 'Example', - [EarlyCareer::GROUP_ID] + [] ); case '/content-alerts/red' === $identifier && !$isEmail: case strpos($identifier, '/content-alerts/unsubscribe/red') !== false && !$isEmail: