diff --git a/TPP.Persistence.MongoDB/Repos/ResponseCommandRepo.cs b/TPP.Persistence.MongoDB/Repos/ResponseCommandRepo.cs index 714a1314..4e13d897 100644 --- a/TPP.Persistence.MongoDB/Repos/ResponseCommandRepo.cs +++ b/TPP.Persistence.MongoDB/Repos/ResponseCommandRepo.cs @@ -55,7 +55,8 @@ public async Task UpsertCommand(string command, string response public async Task RemoveCommand(string command) { - DeleteResult deleteOneAsync = await Collection.DeleteOneAsync(c => c.Command.Equals(command, StringComparison.InvariantCultureIgnoreCase)); + var commandLower = command.ToLower(); + DeleteResult deleteOneAsync = await Collection.DeleteOneAsync(c => c.Command == command || c.Command == commandLower); CommandRemoved?.Invoke(this, command); return deleteOneAsync.DeletedCount > 0; }