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 {
397397 }
398398 }
399399
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 ) {
403407 return false ;
404408 }
405409
@@ -1335,6 +1339,7 @@ export default class ComposerController extends Controller {
13351339 composeState : Composer . OPEN ,
13361340 isWarning : false ,
13371341 hasTargetGroups : opts . hasGroups ,
1342+ warningsDisabled : opts . warningsDisabled ,
13381343 } ) ;
13391344
13401345 if ( ! this . model . targetRecipients ) {
You can’t perform that action at this time.
0 commit comments