Reformat and remove stale debugging

This commit is contained in:
2026-02-16 19:50:17 +00:00
parent 658ab10647
commit f3ced1bfd8
10 changed files with 122 additions and 105 deletions

View File

@@ -71,9 +71,7 @@ def _load_since(user_id, service, identifier, person_id, after_ts, limit):
qs = base_queryset.order_by("ts")
seed_previous = None
if after_ts > 0:
seed_previous = (
base_queryset.filter(ts__lte=after_ts).order_by("-ts").first()
)
seed_previous = base_queryset.filter(ts__lte=after_ts).order_by("-ts").first()
# Use a small rolling window to capture late/out-of-order timestamps.
# Frontend dedupes by message id, so repeated rows are ignored.
window_start = max(0, int(after_ts) - 5 * 60 * 1000)
@@ -84,8 +82,7 @@ def _load_since(user_id, service, identifier, person_id, after_ts, limit):
"session",
"session__identifier",
"session__identifier__person",
)
.order_by("-ts")[: max(10, min(limit, 200))]
).order_by("-ts")[: max(10, min(limit, 200))]
)
rows_desc.reverse()
rows = rows_desc