Skip to content
Snippets Groups Projects
Commit dc4a9f5a authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

make sure ntofication.id is always set, before wending read notification

parent 00093ac9
No related branches found
No related tags found
No related merge requests found
......@@ -169,7 +169,12 @@ angular.module('cesium.es.notification.services', ['cesium.services', 'cesium.es
// Mark a notification as read
function markNotificationAsRead(notification) {
if (notification.read) return; // avoid multi call
if (notification.read || !notification.id) return; // avoid multi call
// Should never append (fix in Duniter4j issue #12)
if (!notification.id) {
console.error('[ES] [notification] Could not mark as read: no \'id\' found!', notification);
return;
}
notification.read = true;
CryptoUtils.sign(notification.hash, csWallet.data.keypair)
.then(function(signature){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment