File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
app/assets/javascripts/discourse/app/services Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -397,9 +397,13 @@ export default class ComposerController extends Controller {
397
397
}
398
398
}
399
399
400
- @discourseComputed ( "model.creatingPrivateMessage" , "model.targetRecipients" )
401
- showWarning ( creatingPrivateMessage , usernames ) {
402
- if ( ! this . get ( "currentUser.staff" ) ) {
400
+ @discourseComputed (
401
+ "model.creatingPrivateMessage" ,
402
+ "model.targetRecipients" ,
403
+ "model.warningsDisabled"
404
+ )
405
+ showWarning ( creatingPrivateMessage , usernames , warningsDisabled ) {
406
+ if ( ! this . get ( "currentUser.staff" ) || warningsDisabled ) {
403
407
return false ;
404
408
}
405
409
@@ -1335,6 +1339,7 @@ export default class ComposerController extends Controller {
1335
1339
composeState : Composer . OPEN ,
1336
1340
isWarning : false ,
1337
1341
hasTargetGroups : opts . hasGroups ,
1342
+ warningsDisabled : opts . warningsDisabled ,
1338
1343
} ) ;
1339
1344
1340
1345
if ( ! this . model . targetRecipients ) {
You can’t perform that action at this time.
0 commit comments