@plusscommunities/pluss-core-aws 1.4.4 → 1.4.7-beta.0
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.
|
@@ -14,16 +14,18 @@ module.exports = (rowId, update) => {
|
|
|
14
14
|
} else {
|
|
15
15
|
if (!Updated) update.Updated = now;
|
|
16
16
|
}
|
|
17
|
-
if (TriggerAt)
|
|
17
|
+
if (TriggerAt) {
|
|
18
18
|
update.TriggerAt =
|
|
19
19
|
typeof TriggerAt === "string"
|
|
20
20
|
? moment(TriggerAt).valueOf()
|
|
21
21
|
: TriggerAt;
|
|
22
|
-
|
|
22
|
+
}
|
|
23
|
+
if (Recipients) {
|
|
23
24
|
update.Recipients =
|
|
24
25
|
typeof Recipients === "string" || Recipients instanceof String
|
|
25
26
|
? Recipients.split(",").map((r) => r.trim())
|
|
26
27
|
: Recipients;
|
|
28
|
+
}
|
|
27
29
|
|
|
28
30
|
const updated = await editRef("actionqueue", "RowId", rowId, update);
|
|
29
31
|
|
|
@@ -105,13 +105,20 @@ const getTagMatches = async (users, audienceTypeSelection, site) => {
|
|
|
105
105
|
);
|
|
106
106
|
};
|
|
107
107
|
|
|
108
|
-
module.exports = async (
|
|
108
|
+
module.exports = async (
|
|
109
|
+
site,
|
|
110
|
+
audienceType,
|
|
111
|
+
audienceTypeSelection,
|
|
112
|
+
preview = true
|
|
113
|
+
) => {
|
|
109
114
|
//TODO handle includes and excludes
|
|
110
115
|
const userData = await getUsers(site);
|
|
111
116
|
const users = _.map(
|
|
112
117
|
_.filter(userData, (u) => !u.Deleted),
|
|
113
118
|
(u) => {
|
|
114
|
-
return
|
|
119
|
+
return preview
|
|
120
|
+
? userToUserPreview(u, true, true)
|
|
121
|
+
: { id: u.Id || u.userId, ...u };
|
|
115
122
|
}
|
|
116
123
|
);
|
|
117
124
|
if (!audienceType) return users;
|
package/package.json
CHANGED