about summary refs log tree commit diff
path: root/Jenny/Handlers/InviteHandler.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-06-03 20:19:21 +0200
committerRory& <root@rory.gay>2024-06-03 20:19:21 +0200
commit49eba40d2bc6a98553e57e6f9b8496ff649147a8 (patch)
treebf79603c455ef65b7cfa349cbce285cedd8bf53a /Jenny/Handlers/InviteHandler.cs
downloadJenny-49eba40d2bc6a98553e57e6f9b8496ff649147a8.tar.xz
Initial commit HEAD github/master master
Diffstat (limited to 'Jenny/Handlers/InviteHandler.cs')
-rw-r--r--Jenny/Handlers/InviteHandler.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Jenny/Handlers/InviteHandler.cs b/Jenny/Handlers/InviteHandler.cs
new file mode 100644

index 0000000..128de44 --- /dev/null +++ b/Jenny/Handlers/InviteHandler.cs
@@ -0,0 +1,12 @@ +using LibMatrix.EventTypes.Spec; +using LibMatrix.Utilities.Bot.Services; + +namespace Jenny.Handlers; + +public static class InviteHandler { + public static async Task HandleAsync(InviteHandlerHostedService.InviteEventArgs invite) { + var room = invite.Homeserver.GetRoom(invite.RoomId); + await room.JoinAsync(); + await room.SendMessageEventAsync(new RoomMessageEventContent("m.notice", "Hello! I'm Jenny!")); + } +} \ No newline at end of file