@plusscommunities/pluss-newsletter-aws-training 2.0.5 → 2.0.6
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.
|
@@ -83,11 +83,13 @@ module.exports.getRecentNewsletterEntries = (event, context, callback) => {
|
|
|
83
83
|
return !entry.Private && (!tvMode || entry.TVMode);
|
|
84
84
|
});
|
|
85
85
|
// if (!canManage) {
|
|
86
|
-
|
|
87
|
-
filteredResult
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
if (event.headers.authkey) {
|
|
87
|
+
filteredResult = await filterByAudienceType(
|
|
88
|
+
filteredResult,
|
|
89
|
+
event.headers.authkey,
|
|
90
|
+
site
|
|
91
|
+
);
|
|
92
|
+
}
|
|
91
93
|
// }
|
|
92
94
|
const sortedResult = _.take(
|
|
93
95
|
_.sortBy(filteredResult, "UnixTimestampReverse"),
|
package/newsletterChanged.js
CHANGED
|
@@ -7,6 +7,7 @@ const deleteRef = require("./common/db/common/deleteRef");
|
|
|
7
7
|
const updateRef = require("./common/db/common/updateRef");
|
|
8
8
|
const logUpdate = require("./common/db/strings/logUpdate");
|
|
9
9
|
const publishNotifications = require("./common/db/notifications/publishNotifications");
|
|
10
|
+
const deleteNotificationsByEntity = require("./common/db/notifications/deleteNotificationsByEntity");
|
|
10
11
|
const getAudience = require("./common/helper/audience/getAudience");
|
|
11
12
|
const updateAttribute = require("./common/db/common/updateAttribute");
|
|
12
13
|
const logAnalyticsActivity = require("@plusscommunities/pluss-core-aws/db/analytics/logAnalyticsActivity");
|
|
@@ -169,6 +170,7 @@ module.exports.newsletterChanged = (event, context, callback) => {
|
|
|
169
170
|
});
|
|
170
171
|
|
|
171
172
|
createUserEntries(data, tagged, toRemove);
|
|
173
|
+
if (data.Deleted) deleteNotificationsByEntity(data.RowId);
|
|
172
174
|
|
|
173
175
|
site = data.Site;
|
|
174
176
|
} else if (record.eventName == "REMOVE") {
|
|
@@ -185,6 +187,7 @@ module.exports.newsletterChanged = (event, context, callback) => {
|
|
|
185
187
|
oldTags.push(previousData.SubmittedBy.id);
|
|
186
188
|
|
|
187
189
|
createUserEntries(previousData, [], oldTags);
|
|
190
|
+
deleteNotificationsByEntity(previousData.RowId);
|
|
188
191
|
|
|
189
192
|
site = previousData.Site;
|
|
190
193
|
}
|
package/package-lock.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plusscommunities/pluss-newsletter-aws-training",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -1506,9 +1506,9 @@
|
|
|
1506
1506
|
}
|
|
1507
1507
|
},
|
|
1508
1508
|
"@plusscommunities/pluss-core-aws": {
|
|
1509
|
-
"version": "2.0.
|
|
1510
|
-
"resolved": "https://registry.npmjs.org/@plusscommunities/pluss-core-aws/-/pluss-core-aws-2.0.
|
|
1511
|
-
"integrity": "sha512
|
|
1509
|
+
"version": "2.0.10",
|
|
1510
|
+
"resolved": "https://registry.npmjs.org/@plusscommunities/pluss-core-aws/-/pluss-core-aws-2.0.10.tgz",
|
|
1511
|
+
"integrity": "sha512-csPM7KSGXUOktXzyBjdimvbWFLIxxb+LE9uzvN8R9RkolqhcJc99AmULkgBuuzgof6vqz0Ol8xcz8gBCqDO6VQ==",
|
|
1512
1512
|
"requires": {
|
|
1513
1513
|
"@aws/dynamodb-auto-marshaller": "^0.7.1",
|
|
1514
1514
|
"amazon-cognito-identity-js": "^2.0.19",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plusscommunities/pluss-newsletter-aws-training",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Extension package to enable newsletter on Pluss Communities Platform",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"gc": "node ../../tools/gc ./",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"license": "ISC",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@aws/dynamodb-auto-marshaller": "^0.7.1",
|
|
27
|
-
"@plusscommunities/pluss-core-aws": "2.0.
|
|
27
|
+
"@plusscommunities/pluss-core-aws": "2.0.10",
|
|
28
28
|
"amazon-cognito-identity-js": "^2.0.19",
|
|
29
29
|
"axios": "^1.6.8",
|
|
30
30
|
"aws-sdk": "^2.1591.0",
|