about summary refs log tree commit diff
path: root/ExampleBots/ModerationBot/PolicyEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ExampleBots/ModerationBot/PolicyEngine.cs')
-rw-r--r--ExampleBots/ModerationBot/PolicyEngine.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ExampleBots/ModerationBot/PolicyEngine.cs b/ExampleBots/ModerationBot/PolicyEngine.cs
index 114b90d..0d0ed65 100644
--- a/ExampleBots/ModerationBot/PolicyEngine.cs
+++ b/ExampleBots/ModerationBot/PolicyEngine.cs
@@ -62,12 +62,12 @@ public class PolicyEngine(AuthenticatedHomeserverGeneric hs, ILogger<ModerationB
         await foreach (var policyList in loadTasks.ToAsyncEnumerable()) {
             policyLists.Add(policyList);
 
-            if (policyList.Policies.Count >= 256 || policyLists.Count == PolicyListAccountData.Count) {
+            if (false || policyList.Policies.Count >= 256 || policyLists.Count == PolicyListAccountData.Count) {
                 var progressMsgContent = MessageFormatter.FormatSuccess($"{policyLists.Count}/{PolicyListAccountData.Count} policy lists loaded, " +
                                                                         $"{policyLists.Sum(x => x.Policies.Count)} policies total, {sw.Elapsed} elapsed.")
                     .SetReplaceRelation<RoomMessageEventContent>(progressMessage.EventId);
 
-                _logRoom?.SendMessageEventAsync(progressMsgContent);
+                await _logRoom?.SendMessageEventAsync(progressMsgContent);
             }
         }
 
@@ -253,7 +253,7 @@ public class PolicyEngine(AuthenticatedHomeserverGeneric hs, ILogger<ModerationB
         string raw = "Count | State type | Mapped type", html = "<table><tr><th>Count</th><th>State type</th><th>Mapped type</th></tr>";
         var groupedStates = states.GroupBy(x => x.Type).ToDictionary(x => x.Key, x => x.ToList()).OrderByDescending(x => x.Value.Count);
         foreach (var (type, stateGroup) in groupedStates) {
-            raw += $"{stateGroup.Count} | {type} | {stateGroup[0].MappedType.Name}";
+            raw += $"\n{stateGroup.Count} | {type} | {stateGroup[0].MappedType.Name}";
             html += $"<tr><td>{stateGroup.Count}</td><td>{type}</td><td>{stateGroup[0].MappedType.Name}</td></tr>";
         }