From f715bec563cd492e2a47663b88e78673e0d3b135 Mon Sep 17 00:00:00 2001 From: kim Date: Mon, 31 Mar 2025 15:41:15 +0100 Subject: [PATCH] don't allow multiple entries for BoostOfID values to prevent repeated boosts of same boosts --- internal/cache/timeline/status.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/cache/timeline/status.go b/internal/cache/timeline/status.go index cc99e19c6..053826d2f 100644 --- a/internal/cache/timeline/status.go +++ b/internal/cache/timeline/status.go @@ -272,7 +272,7 @@ func (t *StatusTimeline) Init(cap int) { Indices: []structr.IndexConfig{ {Fields: "AccountID", Multiple: true}, - {Fields: "BoostOfID", Multiple: true}, + {Fields: "BoostOfID", Multiple: false}, {Fields: "BoostOfAccountID", Multiple: true}, }, @@ -298,6 +298,9 @@ func (t *StatusTimeline) Init(cap int) { t.idx_AccountID = t.cache.Index("AccountID") t.idx_BoostOfID = t.cache.Index("BoostOfID") t.idx_BoostOfAccountID = t.cache.Index("BoostOfAccountID") + + // Set max. + t.max = cap } // Load ...