main ← fix-unlisted-topic-events-on-calendar
merged 03:07PM - 25 Jun 26 UTC
Previously, the calendar — along with the `/upcoming-events` page and the `.ics`… subscription feed — listed events from unlisted topics to everyone, because `EventFinder` scoped events with `Topic.listable_topics`, which only excludes private messages and never filters out unlisted (`visible: false`) topics. Unlisting a topic (manually, or as a side effect of spam flagging or a moderator action) therefore removed it from the topic list but left its event on the calendar for all users.
This change makes `EventFinder`'s `listable_topics` apply the `visible` scope unless the user can see unlisted topics (`Guardian#can_see_unlisted_topics?`), mirroring how `TopicQuery` filters topic listings: staff and TL4 users still see events from unlisted topics, while everyone else no longer does.
Meta: https://meta.discourse.org/t/events-from-unlisted-topics-show-on-calendar/406032