@plusscommunities/pluss-core-aws 2.0.14 → 2.0.15-beta.1
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.
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const indexQuery = require("../common/indexQuery");
|
|
2
|
+
|
|
3
|
+
module.exports = (userID) => {
|
|
4
|
+
return new Promise((resolve, reject) => {
|
|
5
|
+
const query = {
|
|
6
|
+
IndexName: "LinkedByLinkedUserIdIndex",
|
|
7
|
+
KeyConditionExpression: "LinkedUserId = :userID",
|
|
8
|
+
ExpressionAttributeValues: {
|
|
9
|
+
":userID": userID,
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
console.log("running linkedUserId query");
|
|
14
|
+
console.log(query);
|
|
15
|
+
indexQuery("linkedusers", query)
|
|
16
|
+
.then((data) => {
|
|
17
|
+
console.log("successful query");
|
|
18
|
+
resolve(data);
|
|
19
|
+
})
|
|
20
|
+
.catch((error) => {
|
|
21
|
+
console.log("query failed");
|
|
22
|
+
console.log(error);
|
|
23
|
+
reject();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
};
|
|
@@ -119,6 +119,10 @@ module.exports = (noti) => {
|
|
|
119
119
|
} else if (type.startsWith("ScheduledAction")) {
|
|
120
120
|
thisNoti.Text = noti.Data.message;
|
|
121
121
|
thisNoti.Icon = "bell-o";
|
|
122
|
+
} else if (type.startsWith("FeedPostApproved")) {
|
|
123
|
+
thisNoti.Text = `You have a new post`;
|
|
124
|
+
thisNoti.Subtext = noti.Data.title;
|
|
125
|
+
thisNoti.Icon = "commenting";
|
|
122
126
|
} else {
|
|
123
127
|
thisNoti.Text = "You have received a notification";
|
|
124
128
|
thisNoti.Icon = "bell-o";
|
package/package.json
CHANGED