Don't save data in notification
This commit is contained in:
1 parent
12150c5efc
commit
76322c0145
2 files changed
+9
-4
No files matched your search
@@ -155,9 +155,14 @@ class CoreNotifier(Notification):
|
|||||||
n = {
|
n = {
|
||||||
'_t': 'notification',
|
'_t': 'notification',
|
||||||
'time': int(time.time()),
|
'time': int(time.time()),
|
||||||
'message': toUnicode(message),
|
'message': toUnicode(message)
|
||||||
'data': data
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if data.get('sticky'):
|
||||||
|
n['sticky'] = True
|
||||||
|
if data.get('important'):
|
||||||
|
n['important'] = True
|
||||||
|
|
||||||
db.insert(n)
|
db.insert(n)
|
||||||
|
|
||||||
self.frontend(type = listener, data = n)
|
self.frontend(type = listener, data = n)
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ var NotificationBase = new Class({
|
|||||||
, 'top');
|
, 'top');
|
||||||
self.notifications.include(result);
|
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;
|
var sticky = true;
|
||||||
App.trigger('message', [result.message, sticky, result])
|
App.trigger('message', [result.message, sticky, result])
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,7 @@ var NotificationBase = new Class({
|
|||||||
|
|
||||||
if(!force_ids) {
|
if(!force_ids) {
|
||||||
var rn = self.notifications.filter(function(n){
|
var rn = self.notifications.filter(function(n){
|
||||||
return !n.read && n.data.important === undefined
|
return !n.read && n.important === undefined
|
||||||
});
|
});
|
||||||
|
|
||||||
var ids = [];
|
var ids = [];
|
||||||
|
|||||||
Reference in new issue
Block a user