From 46df5b8e335754f1582fc4d41d9546808ed8ee66 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Fri, 29 Sep 2023 19:38:00 +0200 Subject: Unit tests, small refactors --- ExampleBots/LibMatrix.ExampleBot/Bot/MRUBot.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ExampleBots/LibMatrix.ExampleBot') 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") { -- cgit 1.4.1