diff --git a/MatrixContentFilter/Commands/RedactCommand.cs b/MatrixContentFilter/Commands/RedactCommand.cs
index 6b2f8b6..9d45f18 100644
--- a/MatrixContentFilter/Commands/RedactCommand.cs
+++ b/MatrixContentFilter/Commands/RedactCommand.cs
@@ -1,14 +1,11 @@
using ArcaneLibs.Extensions;
using LibMatrix.EventTypes.Spec;
-using LibMatrix.EventTypes.Spec.State;
+using LibMatrix.EventTypes.Spec.State.RoomInfo;
using LibMatrix.Filters;
using LibMatrix.Helpers;
-using LibMatrix.Homeservers;
using LibMatrix.Utilities.Bot.Interfaces;
-using MatrixContentFilter.Abstractions;
using MatrixContentFilter.Services;
using MatrixContentFilter.Services.AsyncActionQueues;
-using Microsoft.Extensions.Logging;
namespace MatrixContentFilter.Commands;
@@ -54,11 +51,11 @@ public class RedactCommand(
Key = "\u23f3" //hour glass emoji
}
});
-
- await foreach (var resp in ctx.Room.GetManyMessagesAsync(limit: count, chunkSize: Math.Min(count, 250)
- ,filter: new SyncFilter.RoomFilter.StateFilter(types: [RoomMemberEventContent.EventId, RoomMessageEventContent.EventId], senders: [mxid])
+
+ await foreach (var resp in ctx.Room.GetManyMessagesAsync(limit: count, chunkSize: Math.Min(count, 250),
+ filter: new SyncFilter.RoomFilter.StateFilter(types: [RoomMemberEventContent.EventId, RoomMessageEventContent.EventId], senders: [mxid])
.ToJson(indent: false, ignoreNull: true).UrlEncode())
- ) {
+ ) {
foreach (var msg in resp.Chunk) {
if (msg.Sender != mxid) continue;
if (msg is not { Type: RoomMemberEventContent.EventId or RoomMessageEventContent.EventId }) continue;
@@ -85,7 +82,7 @@ public class RedactCommand(
.Build());
});
}
-
+
await ctx.Room.RedactEventAsync(hourglassReaction.EventId);
await ctx.Room.SendTimelineEventAsync("m.reaction", new RoomMessageReactionEventContent() {
RelatesTo = new() {
|