notifications: add ack flag in db logic

This commit is contained in:
Girish Ramakrishnan
2019-03-04 20:44:41 -08:00
parent 4bf165efaf
commit 8dfe1fe97f
2 changed files with 4 additions and 3 deletions

View File

@@ -78,7 +78,8 @@ function add(userId, eventId, title, message, callback) {
userId: userId,
eventId: eventId,
title: title,
message: message
message: message,
acknowledged: false
}, function (error, result) {
if (error && error.reason === DatabaseError.NOT_FOUND) return callback(new NotificationsError(NotificationsError.NOT_FOUND, error.message));
if (error) return callback(new NotificationsError(NotificationsError.INTERNAL_ERROR, error));