diff --git a/src/notificationdb.js b/src/notificationdb.js index d95031266..eb3e640e3 100644 --- a/src/notificationdb.js +++ b/src/notificationdb.js @@ -27,8 +27,8 @@ function add(notification, callback) { assert.strictEqual(typeof notification, 'object'); assert.strictEqual(typeof callback, 'function'); - const query = 'INSERT INTO notifications (userId, eventId, title, message) VALUES (?, ?, ?, ?)'; - const args = [ notification.userId, notification.eventId, notification.title, notification.message ]; + const query = 'INSERT INTO notifications (userId, eventId, title, message, acknowledged) VALUES (?, ?, ?, ?, ?)'; + const args = [ notification.userId, notification.eventId, notification.title, notification.message, notification.acknowledged ]; database.query(query, args, function (error, result) { if (error && error.code === 'ER_NO_REFERENCED_ROW_2') return callback(new DatabaseError(DatabaseError.NOT_FOUND, 'no such eventlog entry')); diff --git a/src/notifications.js b/src/notifications.js index 3e50f3beb..7c5e8e553 100644 --- a/src/notifications.js +++ b/src/notifications.js @@ -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));