diff --git a/pkg/hicli/paginate.go b/pkg/hicli/paginate.go index 8d7bf05..f37de3d 100644 --- a/pkg/hicli/paginate.go +++ b/pkg/hicli/paginate.go @@ -220,6 +220,10 @@ func (h *HiClient) PaginateServer(ctx context.Context, roomID id.RoomID, limit i return fmt.Errorf("failed to save session request for %s: %w", entry.SessionID, err) } } + err = h.DB.Event.FillReactionCounts(ctx, roomID, events) + if err != nil { + return fmt.Errorf("failed to fill last edit row IDs: %w", err) + } err = h.DB.Event.FillLastEditRowIDs(ctx, roomID, events) if err != nil { return fmt.Errorf("failed to fill last edit row IDs: %w", err) diff --git a/pkg/hicli/sync.go b/pkg/hicli/sync.go index 7e3a3bd..39130f7 100644 --- a/pkg/hicli/sync.go +++ b/pkg/hicli/sync.go @@ -430,6 +430,7 @@ func (h *HiClient) processEvent( } } dbEvt := database.MautrixToEvent(evt) + dbEvt.Reactions = make(map[string]int) contentWithoutFallback := removeReplyFallback(evt) if contentWithoutFallback != nil { dbEvt.Content = contentWithoutFallback