about summary refs log tree commit diff
path: root/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-03-26 11:13:59 +0100
committerRory& <root@rory.gay>2025-03-26 11:13:59 +0100
commitff13e64dca922550eb6a955de0690d841590a9b0 (patch)
tree2298f5b7f78bbe6777d963c6f922455290822174 /Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs
parentRename FullState to AlwaysIncludeAllRooms in synchelper, to make it less conf... (diff)
downloadLibMatrix-ff13e64dca922550eb6a955de0690d841590a9b0.tar.xz
Split out invite context, add empty filter constants
Diffstat (limited to 'Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs')
-rw-r--r--Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs b/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs

index f7ef317..4947394 100644 --- a/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs +++ b/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs
@@ -69,16 +69,16 @@ public class BotInstaller(IServiceCollection services) { return this; } - public BotInstaller WithInviteHandler(Func<InviteHandlerHostedService.InviteEventArgs, Task> inviteHandler) { + public BotInstaller WithInviteHandler(Func<RoomInviteContext, Task> inviteHandler) { services.AddSingleton(inviteHandler); services.AddHostedService<InviteHandlerHostedService>(); services.AddSingleton<InviteHandlerHostedService.InviteListenerSyncConfiguration>(); return this; } - public BotInstaller WithInviteHandler<T>() where T : class, InviteHandlerHostedService.IInviteHandler { + public BotInstaller WithInviteHandler<T>() where T : class, IRoomInviteHandler { services.AddSingleton<T>(); - services.AddSingleton<Func<InviteHandlerHostedService.InviteEventArgs, Task>>(sp => sp.GetRequiredService<T>().HandleInviteAsync); + services.AddSingleton<Func<RoomInviteContext, Task>>(sp => sp.GetRequiredService<T>().HandleInviteAsync); services.AddHostedService<InviteHandlerHostedService>(); services.AddSingleton<InviteHandlerHostedService.InviteListenerSyncConfiguration>(); return this;