From ab82f8b131834c05fc2a62b5a8fd48137b892c8f Mon Sep 17 00:00:00 2001 From: Skip R Date: Thu, 11 Dec 2025 19:50:16 -0800 Subject: [PATCH] backfill: document why we aren't backfilling reactions (for now) --- pkg/connector/backfill.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkg/connector/backfill.go b/pkg/connector/backfill.go index e7606e8..05d4961 100644 --- a/pkg/connector/backfill.go +++ b/pkg/connector/backfill.go @@ -68,7 +68,22 @@ func (dc *DiscordClient) FetchMessages(ctx context.Context, fetchParams bridgev2 streamOrder, _ := strconv.ParseInt(msg.ID, 10, 64) ts, _ := discordgo.SnowflakeTimestamp(msg.ID) - // FIXME(skip): Backfill reactions. + // NOTE: For now, we aren't backfilling reactions. This is because: + // + // - Discord does not provide enough historical reaction data in the + // response from the message history endpoint to construct valid + // BackfillReactions. + // - Fetching the reaction data would be prohibitively expensive for + // messages with many reactions. Messages in large guilds can have + // tens of thousands of reactions. + // - Indicating aggregated child events[1] from BackfillMessage doesn't + // seem possible due to how portal backfilling batching currently + // works. + // + // [1]: https://spec.matrix.org/v1.16/client-server-api/#reference-relations + // + // It might be worth fetching the reaction data anyways if we observe + // a small overall number of reactions. sender := dc.makeEventSender(msg.Author) // Use the ghost's intent, falling back to the bridge's.