@aglyn/plugins-marketing 1.0.0-beta.165 → 1.0.0-beta.167

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/plugins-marketing",
3
- "version": "1.0.0-beta.165",
3
+ "version": "1.0.0-beta.167",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -25,20 +25,20 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/aglyn": "1.0.0-beta.165",
29
- "@aglyn/shared-data-enums": "1.0.0-beta.165",
30
- "@aglyn/shared-data-mdi": "1.0.0-beta.165",
31
- "@aglyn/shared-ui-email-campaigns": "1.0.0-beta.165",
32
- "@aglyn/shared-ui-jsx": "1.0.0-beta.165",
33
- "@aglyn/shared-ui-jsx-forms": "1.0.0-beta.165",
34
- "@aglyn/shared-ui-next": "1.0.0-beta.165",
35
- "@aglyn/shared-ui-snackstack": "1.0.0-beta.165",
36
- "@aglyn/shared-util-email": "1.0.0-beta.165",
37
- "@aglyn/shared-util-http": "1.0.0-beta.165",
38
- "@aglyn/shared-util-timestamp": "1.0.0-beta.165",
39
- "@aglyn/tenant-data-admin": "1.0.0-beta.165",
40
- "@aglyn/tenant-feature-instance": "1.0.0-beta.165",
41
- "@aglyn/tenant-runtime": "1.0.0-beta.165",
28
+ "@aglyn/aglyn": "1.0.0-beta.167",
29
+ "@aglyn/shared-data-enums": "1.0.0-beta.167",
30
+ "@aglyn/shared-data-mdi": "1.0.0-beta.167",
31
+ "@aglyn/shared-ui-email-campaigns": "1.0.0-beta.167",
32
+ "@aglyn/shared-ui-jsx": "1.0.0-beta.167",
33
+ "@aglyn/shared-ui-jsx-forms": "1.0.0-beta.167",
34
+ "@aglyn/shared-ui-next": "1.0.0-beta.167",
35
+ "@aglyn/shared-ui-snackstack": "1.0.0-beta.167",
36
+ "@aglyn/shared-util-email": "1.0.0-beta.167",
37
+ "@aglyn/shared-util-http": "1.0.0-beta.167",
38
+ "@aglyn/shared-util-timestamp": "1.0.0-beta.167",
39
+ "@aglyn/tenant-data-admin": "1.0.0-beta.167",
40
+ "@aglyn/tenant-feature-instance": "1.0.0-beta.167",
41
+ "@aglyn/tenant-runtime": "1.0.0-beta.167",
42
42
  "@swc/helpers": "0.5.23"
43
43
  },
44
44
  "peerDependencies": {
@@ -559,7 +559,10 @@ export async function performCampaignSend(options) {
559
559
  }
560
560
  };
561
561
  if (audience === 'leads') {
562
- const leads = await sweepAudience(hostRef.collection('leads'));
562
+ // Through the scoped org query (AGL-3275), as the contacts audience below
563
+ // already is: the collection is org-wide, so an unnarrowed sweep would
564
+ // MAIL a sibling brand's leads under this site's campaign.
565
+ const leads = await sweepAudience((await orgDataQueryForHost(hostId, 'leads')).query);
563
566
  audienceTruncated = leads.truncated;
564
567
  recipients = leads.docs.map((doc)=>{
565
568
  var _doc_get;
@@ -2085,7 +2088,7 @@ export async function performCampaignSend(options) {
2085
2088
  }
2086
2089
  };
2087
2090
  const [leads, members, contacts] = await Promise.all([
2088
- hostRef.collection('leads').orderBy(byId).limit(PROOF_PERSONA_SAMPLE).get().catch(()=>null),
2091
+ orgDataQueryForHost(hostId, 'leads').then(({ query })=>query.orderBy(byId).limit(PROOF_PERSONA_SAMPLE).get()).catch(()=>null),
2089
2092
  hostRef.collection('siteMembers').orderBy(byId).limit(PROOF_PERSONA_SAMPLE).get().catch(()=>null),
2090
2093
  orgDataQueryForHost(hostId, 'contacts').then(({ query })=>query.orderBy(byId).limit(PROOF_PERSONA_SAMPLE).get()).catch(()=>null)
2091
2094
  ]);