@@ -49,9 +49,10 @@ def notify_success(
49
49
sticky = False ,
50
50
target = None ,
51
51
action = None ,
52
+ params = None ,
52
53
):
53
54
title = title or _ ("Success" )
54
- self ._notify_channel (SUCCESS , message , title , sticky , target , action )
55
+ self ._notify_channel (SUCCESS , message , title , sticky , target , action , params )
55
56
56
57
def notify_danger (
57
58
self ,
@@ -60,9 +61,10 @@ def notify_danger(
60
61
sticky = False ,
61
62
target = None ,
62
63
action = None ,
64
+ params = None ,
63
65
):
64
66
title = title or _ ("Danger" )
65
- self ._notify_channel (DANGER , message , title , sticky , target , action )
67
+ self ._notify_channel (DANGER , message , title , sticky , target , action , params )
66
68
67
69
def notify_warning (
68
70
self ,
@@ -71,9 +73,10 @@ def notify_warning(
71
73
sticky = False ,
72
74
target = None ,
73
75
action = None ,
76
+ params = None ,
74
77
):
75
78
title = title or _ ("Warning" )
76
- self ._notify_channel (WARNING , message , title , sticky , target , action )
79
+ self ._notify_channel (WARNING , message , title , sticky , target , action , params )
77
80
78
81
def notify_info (
79
82
self ,
@@ -82,9 +85,10 @@ def notify_info(
82
85
sticky = False ,
83
86
target = None ,
84
87
action = None ,
88
+ params = None ,
85
89
):
86
90
title = title or _ ("Information" )
87
- self ._notify_channel (INFO , message , title , sticky , target , action )
91
+ self ._notify_channel (INFO , message , title , sticky , target , action , params )
88
92
89
93
def notify_default (
90
94
self ,
@@ -93,9 +97,10 @@ def notify_default(
93
97
sticky = False ,
94
98
target = None ,
95
99
action = None ,
100
+ params = None ,
96
101
):
97
102
title = title or _ ("Default" )
98
- self ._notify_channel (DEFAULT , message , title , sticky , target , action )
103
+ self ._notify_channel (DEFAULT , message , title , sticky , target , action , params )
99
104
100
105
def _notify_channel (
101
106
self ,
@@ -105,6 +110,7 @@ def _notify_channel(
105
110
sticky = False ,
106
111
target = None ,
107
112
action = None ,
113
+ params = None ,
108
114
):
109
115
if not (self .env .user ._is_admin () or self .env .su ) and any (
110
116
user .id != self .env .uid for user in self
@@ -122,6 +128,7 @@ def _notify_channel(
122
128
"title" : title ,
123
129
"sticky" : sticky ,
124
130
"action" : action ,
131
+ "params" : dict (params or []),
125
132
}
126
133
127
134
notifications = [[partner , "web.notify" , [bus_message ]] for partner in target ]
0 commit comments