Support invite-only rooms. master
authorRudolf Polzer <divVerent@gmail.com>
Wed, 25 Jan 2023 02:50:39 +0000 (03:50 +0100)
committerRudolf Polzer <divVerent@gmail.com>
Wed, 25 Jan 2023 02:50:39 +0000 (03:50 +0100)
misc/infrastructure/powerbot/bot.go

index 3566eede8d6b0985e519ade70a2d37cf049c6ba7..e62906e8a2dac1f9b230dfc178c64b9911155100 100644 (file)
@@ -223,7 +223,7 @@ func Run() (err error) {
                if since != "" && !fullySynced {
                        log.Print("Fully synced.")
                        for room, users := range roomUsers {
-                               if len(users) == 0 {
+                               if _, found := users[config.UserID]; !found {
                                        log.Printf("Not actually joined %v yet...", room)
                                        _, err := client.JoinRoom(string(room), "", nil)
                                        if err != nil {