From 8dadf547033d71480fd7756809992c0f32549f59 Mon Sep 17 00:00:00 2001 From: "Emma [it/its]@Rory&" Date: Thu, 11 Jan 2024 07:31:09 +0100 Subject: Cleanup, more message formatters, messagebuilder start --- ExampleBots/ModerationBot/PolicyEngine.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ExampleBots/ModerationBot/PolicyEngine.cs') 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= 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(progressMessage.EventId); - _logRoom?.SendMessageEventAsync(progressMsgContent); + await _logRoom?.SendMessageEventAsync(progressMsgContent); } } @@ -253,7 +253,7 @@ public class PolicyEngine(AuthenticatedHomeserverGeneric hs, ILogger 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 += $"{stateGroup.Count}{type}{stateGroup[0].MappedType.Name}"; } -- cgit 1.5.1