about summary refs log tree commit diff
path: root/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-05-30 09:46:43 +0000
committerRory& <root@rory.gay>2024-05-30 09:46:43 +0000
commit30a0868789466012bab869af4300aef5a9cac108 (patch)
tree12790166e4d2c01a141928143b9b4d96dd08ace8 /Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs
parentClarify LegacyEvent types (diff)
downloadLibMatrix-30a0868789466012bab869af4300aef5a9cac108.tar.xz
Rename legacy event types
Diffstat (limited to 'Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs')
-rw-r--r--Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs b/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs
index c171dfe..1b69c89 100644
--- a/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs
+++ b/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs
@@ -9,7 +9,7 @@ public class CommandContext {
     public required LegacyMatrixEventResponse MessageEvent { get; set; }
 
     public string MessageContentWithoutReply =>
-        (MessageEvent.TypedContent as RoomMessageEventContent)!
+        (MessageEvent.TypedContent as RoomMessageLegacyEventContent)!
         .Body.Split('\n')
         .SkipWhile(x => x.StartsWith(">"))
         .Aggregate((x, y) => $"{x}\n{y}");
@@ -18,7 +18,7 @@ public class CommandContext {
     public required string[] Args;
     public required AuthenticatedHomeserverGeneric Homeserver { get; set; }
 
-    public async Task<EventIdResponse> Reply(RoomMessageEventContent content) => await Room.SendMessageEventAsync(content);
+    public async Task<EventIdResponse> Reply(RoomMessageLegacyEventContent content) => await Room.SendMessageEventAsync(content);
 }
 
 public class CommandResult {