From 9254461795a66715500f66409aeb5a23d4ad0713 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 17 Oct 2024 23:22:29 +0300 Subject: [PATCH] hicli/sync: always send room in sync if own receipts change --- pkg/hicli/sync.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/hicli/sync.go b/pkg/hicli/sync.go index 47471a1..54379c1 100644 --- a/pkg/hicli/sync.go +++ b/pkg/hicli/sync.go @@ -695,7 +695,8 @@ func (h *HiClient) processStateAndTimeline( return fmt.Errorf("failed to save room data: %w", err) } } - if roomChanged || len(timelineRowTuples) > 0 || len(allNewEvents) > 0 { + // TODO why is *old* unread count sometimes zero when processing the read receipt that is making it zero? + if roomChanged || len(newOwnReceipts) > 0 || len(timelineRowTuples) > 0 || len(allNewEvents) > 0 { ctx.Value(syncContextKey).(*syncContext).evt.Rooms[room.ID] = &SyncRoom{ Meta: room, Timeline: timelineRowTuples,