Don't save data in notification
This commit is contained in:
@@ -155,9 +155,14 @@ class CoreNotifier(Notification):
|
||||
n = {
|
||||
'_t': 'notification',
|
||||
'time': int(time.time()),
|
||||
'message': toUnicode(message),
|
||||
'data': data
|
||||
'message': toUnicode(message)
|
||||
}
|
||||
|
||||
if data.get('sticky'):
|
||||
n['sticky'] = True
|
||||
if data.get('important'):
|
||||
n['important'] = True
|
||||
|
||||
db.insert(n)
|
||||
|
||||
self.frontend(type = listener, data = n)
|
||||
|
||||
@@ -50,7 +50,7 @@ var NotificationBase = new Class({
|
||||
, 'top');
|
||||
self.notifications.include(result);
|
||||
|
||||
if((result.data.important !== undefined || result.data.sticky !== undefined) && !result.read){
|
||||
if((result.important !== undefined || result.sticky !== undefined) && !result.read){
|
||||
var sticky = true;
|
||||
App.trigger('message', [result.message, sticky, result])
|
||||
}
|
||||
@@ -72,7 +72,7 @@ var NotificationBase = new Class({
|
||||
|
||||
if(!force_ids) {
|
||||
var rn = self.notifications.filter(function(n){
|
||||
return !n.read && n.data.important === undefined
|
||||
return !n.read && n.important === undefined
|
||||
});
|
||||
|
||||
var ids = [];
|
||||
|
||||
Reference in New Issue
Block a user