diff options
author | Rory& <root@rory.gay> | 2024-05-30 09:46:43 +0000 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-05-30 09:46:43 +0000 |
commit | 30a0868789466012bab869af4300aef5a9cac108 (patch) | |
tree | 12790166e4d2c01a141928143b9b4d96dd08ace8 /Utilities/LibMatrix.Utilities.Bot/Interfaces | |
parent | Clarify LegacyEvent types (diff) | |
download | LibMatrix-30a0868789466012bab869af4300aef5a9cac108.tar.xz |
Rename legacy event types
Diffstat (limited to '')
-rw-r--r-- | Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs | 4 |
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 { |