|
|
@@ -53,7 +53,7 @@ export default class InAppNotificationService {
|
|
|
}
|
|
|
|
|
|
upsertByActivity = async function(
|
|
|
- users: Types.ObjectId[], activity: ActivityDocument, pageIdSnapshot: string, createdAt?: Date | null,
|
|
|
+ users: Types.ObjectId[], activity: ActivityDocument, snapshot: string, createdAt?: Date | null,
|
|
|
): Promise<void> {
|
|
|
const {
|
|
|
_id: activityId, targetModel, target, action,
|
|
|
@@ -62,7 +62,7 @@ export default class InAppNotificationService {
|
|
|
const lastWeek = subDays(now, 7);
|
|
|
const operations = users.map((user) => {
|
|
|
const filter = {
|
|
|
- user, target, action, createdAt: { $gt: lastWeek }, pageIdSnapshot,
|
|
|
+ user, target, action, createdAt: { $gt: lastWeek }, snapshot,
|
|
|
};
|
|
|
const parameters = {
|
|
|
user,
|
|
|
@@ -71,7 +71,7 @@ export default class InAppNotificationService {
|
|
|
action,
|
|
|
status: STATUS_UNREAD,
|
|
|
createdAt: now,
|
|
|
- pageIdSnapshot,
|
|
|
+ snapshot,
|
|
|
$addToSet: { activities: activityId },
|
|
|
};
|
|
|
return {
|