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
|