diff --git a/posthog/session_recordings/queries/session_replay_events.py b/posthog/session_recordings/queries/session_replay_events.py index 0d60559c7a047..e77d923fa4709 100644 --- a/posthog/session_recordings/queries/session_replay_events.py +++ b/posthog/session_recordings/queries/session_replay_events.py @@ -23,7 +23,11 @@ def exists(self, session_id: str, team: Team) -> bool: FROM session_replay_events WHERE team_id = %(team_id)s AND session_id = %(session_id)s - AND min_first_timestamp >= now() - INTERVAL %(recording_ttl_days)s DAY + -- we should check for the `ttl_days(team)` TTL here, + -- but for a shared/pinned recording + -- the TTL effectively becomes 1 year + -- and we don't know which we're dealing with + AND min_first_timestamp >= now() - INTERVAL 370 DAY """, { "team_id": team.pk,