diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-10-06 18:29:15 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-10-06 18:29:15 +0200 |
commit | e5591eef3850a9796cc87386128651a828b70697 (patch) | |
tree | 7e501ec749229a3d96838265289266bb6f6ce208 /ExampleBots/MediaModeratorPoC/StateEventTypes/MediaPolicyStateEventData.cs | |
parent | Unit tests, small refactors (diff) | |
download | LibMatrix-e5591eef3850a9796cc87386128651a828b70697.tar.xz |
Small refactors
Diffstat (limited to '')
-rw-r--r-- | ExampleBots/MediaModeratorPoC/StateEventTypes/MediaPolicyStateEventData.cs | 17 |
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; } +} |