about summary refs log tree commit diff
path: root/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-05-30 08:02:40 +0000
committerRory& <root@rory.gay>2024-05-30 08:02:40 +0000
commitae18c049338dfcb33f721eeeb0a05571e8bd87a9 (patch)
tree9e73ae6a42a310efe43c6a9ed7d13ce19e0cbde5 /Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs
parentLog warning if registering a duplicate type (diff)
downloadLibMatrix-ae18c049338dfcb33f721eeeb0a05571e8bd87a9.tar.xz
Rename StateEvent to LegacyMatrixEvent
Diffstat (limited to '')
-rw-r--r--Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs b/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs

index 601e598..b322362 100644 --- a/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs +++ b/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs
@@ -90,7 +90,7 @@ public class CommandListenerHostedService : IHostedService { await _listenerTask.WaitAsync(cancellationToken); } - private async Task<string?> GetUsedPrefix(StateEventResponse evt) { + private async Task<string?> GetUsedPrefix(LegacyMatrixEventResponse evt) { var messageContent = evt.TypedContent as RoomMessageEventContent; var message = messageContent!.BodyWithoutReplyFallback; var prefix = _config.Prefixes.OrderByDescending(x => x.Length).FirstOrDefault(message.StartsWith); @@ -110,7 +110,7 @@ public class CommandListenerHostedService : IHostedService { return prefix; } - private async Task<CommandResult> InvokeCommand(StateEventResponse evt, string usedPrefix) { + private async Task<CommandResult> InvokeCommand(LegacyMatrixEventResponse evt, string usedPrefix) { var message = evt.TypedContent as RoomMessageEventContent; var room = _hs.GetRoom(evt.RoomId!);