]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
Fix handling of leave events due to kick.
authorRudolf Polzer <divVerent@gmail.com>
Fri, 18 Feb 2022 00:02:59 +0000 (01:02 +0100)
committerRudolf Polzer <divVerent@gmail.com>
Fri, 18 Feb 2022 00:03:25 +0000 (01:03 +0100)
misc/infrastructure/powerbot/bot.go

index 2917c1d64839fc7c2b1fdd4dae47657a21554d9a..2f26ff00c24d2f4dea42d22191cbfc1814cd25f0 100644 (file)
@@ -199,9 +199,9 @@ func Run() (err error) {
                mem := evt.Content.AsMember()
                switch mem.Membership {
                case event.MembershipJoin:
-                       handleJoin(eventTime(evt), evt.RoomID, evt.Sender, evt)
+                       handleJoin(eventTime(evt), evt.RoomID, evt.StateKey, evt)
                case event.MembershipLeave:
-                       handleLeave(eventTime(evt), evt.RoomID, evt.Sender, evt)
+                       handleLeave(eventTime(evt), evt.RoomID, evt.StateKey, evt)
                default: // Ignore.
                }
        })