From 0ad13628bb8ef899927b7b42b5357fe616ce057c Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Tue, 17 Oct 2023 17:11:37 +0200 Subject: Add updating of profiles and fetching room profiles --- ExampleBots/MediaModeratorPoC/Commands/BanMediaCommand.cs | 3 ++- ExampleBots/MediaModeratorPoC/StateEventTypes/BasePolicy.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'ExampleBots') diff --git a/ExampleBots/MediaModeratorPoC/Commands/BanMediaCommand.cs b/ExampleBots/MediaModeratorPoC/Commands/BanMediaCommand.cs index 69c0583..5dfa706 100644 --- a/ExampleBots/MediaModeratorPoC/Commands/BanMediaCommand.cs +++ b/ExampleBots/MediaModeratorPoC/Commands/BanMediaCommand.cs @@ -1,3 +1,4 @@ +using System.Buffers.Text; using System.Security.Cryptography; using ArcaneLibs.Extensions; using LibMatrix; @@ -87,7 +88,7 @@ public class BanMediaCommand(IServiceProvider services, HomeserverProviderServic MediaPolicyEventContent policy; await policyRoom.SendStateEventAsync("gay.rory.media_moderator_poc.rule.media", Guid.NewGuid().ToString(), policy = new MediaPolicyEventContent { - Entity = uriHash, + // Entity = uriHash, FileHash = fileHash, Reason = string.Join(' ', ctx.Args[1..]), Recommendation = recommendation, diff --git a/ExampleBots/MediaModeratorPoC/StateEventTypes/BasePolicy.cs b/ExampleBots/MediaModeratorPoC/StateEventTypes/BasePolicy.cs index 048c1d0..7735314 100644 --- a/ExampleBots/MediaModeratorPoC/StateEventTypes/BasePolicy.cs +++ b/ExampleBots/MediaModeratorPoC/StateEventTypes/BasePolicy.cs @@ -1,10 +1,11 @@ using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; using LibMatrix; +using LibMatrix.Interfaces; namespace MediaModeratorPoC.StateEventTypes; -public abstract class BasePolicy : StateEvent { +public abstract class BasePolicy : EventContent { /// /// Entity this policy applies to /// -- cgit 1.4.1