about summary refs log tree commit diff
path: root/ExampleBots/MediaModeratorPoC/StateEventTypes/MediaPolicyStateEventData.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-10-06 18:29:15 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-10-06 18:29:15 +0200
commite5591eef3850a9796cc87386128651a828b70697 (patch)
tree7e501ec749229a3d96838265289266bb6f6ce208 /ExampleBots/MediaModeratorPoC/StateEventTypes/MediaPolicyStateEventData.cs
parentUnit tests, small refactors (diff)
downloadLibMatrix-e5591eef3850a9796cc87386128651a828b70697.tar.xz
Small refactors
Diffstat (limited to 'ExampleBots/MediaModeratorPoC/StateEventTypes/MediaPolicyStateEventData.cs')
-rw-r--r--ExampleBots/MediaModeratorPoC/StateEventTypes/MediaPolicyStateEventData.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/ExampleBots/MediaModeratorPoC/StateEventTypes/MediaPolicyStateEventData.cs b/ExampleBots/MediaModeratorPoC/StateEventTypes/MediaPolicyStateEventData.cs
new file mode 100644
index 0000000..603a858
--- /dev/null
+++ b/ExampleBots/MediaModeratorPoC/StateEventTypes/MediaPolicyStateEventData.cs
@@ -0,0 +1,17 @@
+using System.Text.Json.Serialization;
+using LibMatrix.EventTypes;
+
+namespace MediaModeratorPoC.StateEventTypes;
+
+/// <summary>
+///     File policy event, entity is the MXC URI of the file, hashed with SHA3-256.
+/// </summary>
+[MatrixEvent(EventName = "gay.rory.media_moderator_poc.rule.homeserver")]
+[MatrixEvent(EventName = "gay.rory.media_moderator_poc.rule.media")]
+public class MediaPolicyEventContent : BasePolicy {
+    /// <summary>
+    ///     Hash of the file
+    /// </summary>
+    [JsonPropertyName("file_hash")]
+    public byte[]? FileHash { get; set; }
+}