From 30a0868789466012bab869af4300aef5a9cac108 Mon Sep 17 00:00:00 2001 From: Rory& Date: Thu, 30 May 2024 09:46:43 +0000 Subject: Rename legacy event types --- Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs') 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 Reply(RoomMessageEventContent content) => await Room.SendMessageEventAsync(content); + public async Task Reply(RoomMessageLegacyEventContent content) => await Room.SendMessageEventAsync(content); } public class CommandResult { -- cgit 1.4.1