mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-26 06:58:40 +00:00
Fix missing filtering, filter inconsistencies, and filter logging
This commit is contained in:
parent
a3022ff5b4
commit
27f0a81dc5
12 changed files with 40 additions and 40 deletions
|
@ -3,12 +3,10 @@ using LBPUnion.ProjectLighthouse.Configuration;
|
|||
using LBPUnion.ProjectLighthouse.Database;
|
||||
using LBPUnion.ProjectLighthouse.Extensions;
|
||||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Logging;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Token;
|
||||
using LBPUnion.ProjectLighthouse.Types.Filter;
|
||||
using LBPUnion.ProjectLighthouse.Types.Levels;
|
||||
using LBPUnion.ProjectLighthouse.Types.Logging;
|
||||
using LBPUnion.ProjectLighthouse.Types.Serialization;
|
||||
using LBPUnion.ProjectLighthouse.Types.Users;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
@ -144,11 +142,7 @@ public class CommentController : ControllerBase
|
|||
targetId = await this.database.UserIdFromUsername(username!);
|
||||
}
|
||||
|
||||
string filteredText = CensorHelper.FilterMessage(comment.Message);
|
||||
|
||||
if (ServerConfiguration.Instance.LogChatFiltering && filteredText != comment.Message)
|
||||
Logger.Info($"Censored profane word(s) from in-game comment sent by {username}: \"{comment.Message}\" => \"{filteredText}\"",
|
||||
LogArea.Filter);
|
||||
string filteredText = CensorHelper.FilterMessage(comment.Message, "in-game comment", username);
|
||||
|
||||
bool success = await this.database.PostComment(token.UserId, targetId, type, filteredText);
|
||||
if (success) return this.Ok();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue