Enha: remove bot without room
This commit is contained in:
		| @@ -96,7 +96,6 @@ func (cm *CronManager) CleanupRooms() { | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		// If the creator is not in the room or the room is inactive, it's time to delete | ||||
| 		if !creatorInRoom || isInactive { | ||||
| 			reason := "creator left" | ||||
| @@ -107,7 +106,7 @@ func (cm *CronManager) CleanupRooms() { | ||||
|  | ||||
| 			for _, player := range players { | ||||
| 				if player.IsBot { | ||||
| 					if err := cm.repo.PlayerDelete(ctx, room.ID, player.Username); err != nil { | ||||
| 					if err := cm.repo.PlayerDelete(ctx, room.ID); err != nil { | ||||
| 						cm.log.Error("failed to delete bot player", "room_id", room.ID, "username", player.Username, "err", err) | ||||
| 					} | ||||
| 				} else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder