about summary refs log tree commit diff
path: root/ExampleBots/LibMatrix.ExampleBot/Bot/MRUBot.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-09-29 19:38:00 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-09-29 19:38:00 +0200
commit46df5b8e335754f1582fc4d41d9546808ed8ee66 (patch)
tree29fed832bed495f1bd233c37275cb560c19f34cf /ExampleBots/LibMatrix.ExampleBot/Bot/MRUBot.cs
parentAdd more stuff, add unit tests (diff)
downloadLibMatrix-46df5b8e335754f1582fc4d41d9546808ed8ee66.tar.xz
Unit tests, small refactors
Diffstat (limited to 'ExampleBots/LibMatrix.ExampleBot/Bot/MRUBot.cs')
-rw-r--r--ExampleBots/LibMatrix.ExampleBot/Bot/MRUBot.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ExampleBots/LibMatrix.ExampleBot/Bot/MRUBot.cs b/ExampleBots/LibMatrix.ExampleBot/Bot/MRUBot.cs
index f04ec3a..0211f74 100644
--- a/ExampleBots/LibMatrix.ExampleBot/Bot/MRUBot.cs
+++ b/ExampleBots/LibMatrix.ExampleBot/Bot/MRUBot.cs
@@ -57,7 +57,7 @@ public class MRUBot : IHostedService {
         hs.SyncHelper.InviteReceivedHandlers.Add(async Task (args) => {
             var inviteEvent =
                 args.Value.InviteState.Events.FirstOrDefault(x =>
-                    x.Type == "m.room.member" && x.StateKey == hs.WhoAmI.UserId);
+                    x.Type == "m.room.member" && x.StateKey == hs.UserId);
             _logger.LogInformation(
                 $"Got invite to {args.Key} by {inviteEvent.Sender} with reason: {(inviteEvent.TypedContent as RoomMemberEventContent).Reason}");
             if (inviteEvent.Sender.EndsWith(":rory.gay") || inviteEvent.Sender == "@mxidupwitch:the-apothecary.club") {