Skip to content
Snippets Groups Projects
Commit 47ec850f authored by Tom Käsler's avatar Tom Käsler
Browse files

Avoid confusion by only allowing directSend=false when moderation is enabled

parent ba09b5db
No related merge requests found
...@@ -187,14 +187,17 @@ export class CommentSettingsComponent implements OnInit { ...@@ -187,14 +187,17 @@ export class CommentSettingsComponent implements OnInit {
const commentSettings = new CommentSettings(); const commentSettings = new CommentSettings();
commentSettings.roomId = this.roomId; commentSettings.roomId = this.roomId;
commentSettings.directSend = this.directSend; commentSettings.directSend = this.directSend;
this.commentSettingsService.update(commentSettings).subscribe( x => { const settingsReturn = new CommentSettingsDialog();
const settingsReturn = new CommentSettingsDialog(); // If moderation isn't enabled, the direct send is of no interest and shouldn't be updated to avoid confusion about missing comments
settingsReturn.enableModeration = this.enableCommentModeration; if ((this.enableCommentModeration && !this.directSend) || this.directSend) {
this.commentSettingsService.update(commentSettings).subscribe( x => {
});
settingsReturn.directSend = this.directSend; settingsReturn.directSend = this.directSend;
settingsReturn.enableThreshold = this.settingThreshold; }
settingsReturn.threshold = this.commentThreshold; settingsReturn.enableModeration = this.enableCommentModeration;
this.dialogRef.close(settingsReturn); settingsReturn.enableThreshold = this.settingThreshold;
}); settingsReturn.threshold = this.commentThreshold;
this.dialogRef.close(settingsReturn);
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment