about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-03-19 11:37:05 +0100
committerRory& <root@rory.gay>2025-03-19 11:37:05 +0100
commit917745ddb0228daddbd4d87582e2ef6059c21644 (patch)
tree1bfa9f76bc1cdc268b11057a6754da42346fa206
parentRefactor room specialisations to be functions, make http logging configurable (diff)
downloadLibMatrix-917745ddb0228daddbd4d87582e2ef6059c21644.tar.xz
Add debugger display for spec policies
-rw-r--r--LibMatrix.EventTypes/Spec/State/Policy/PolicyRuleStateEventContent.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/LibMatrix.EventTypes/Spec/State/Policy/PolicyRuleStateEventContent.cs b/LibMatrix.EventTypes/Spec/State/Policy/PolicyRuleStateEventContent.cs

index 27d505c..0cb4a25 100644 --- a/LibMatrix.EventTypes/Spec/State/Policy/PolicyRuleStateEventContent.cs +++ b/LibMatrix.EventTypes/Spec/State/Policy/PolicyRuleStateEventContent.cs
@@ -1,3 +1,4 @@ +using System.Diagnostics; using System.Security.Cryptography; using System.Text.Json.Serialization; using System.Text.RegularExpressions; @@ -31,6 +32,7 @@ public class RoomPolicyRuleEventContent : PolicyRuleEventContent { public const string EventId = "m.policy.rule.room"; } +[DebuggerDisplay("""{GetType().Name.Replace("PolicyRuleEventContent", ""),nq} policy matching {Entity}, Reason: {Reason}""")] public abstract class PolicyRuleEventContent : EventContent { // public PolicyRuleEventContent() => Console.WriteLine($"init policy {GetType().Name}"); private string? _reason;