diff --git a/pkg/hicli/json-commands.go b/pkg/hicli/json-commands.go index 1002d56..0492e36 100644 --- a/pkg/hicli/json-commands.go +++ b/pkg/hicli/json-commands.go @@ -106,10 +106,10 @@ func (h *HiClient) handleJSONCommand(ctx context.Context, req *JSONCommand) (any return unmarshalAndCall(req.Data, func(params *getEventParams) (*database.Event, error) { return h.GetEvent(ctx, params.RoomID, params.EventID) }) - case "get_events_by_rowids": - return unmarshalAndCall(req.Data, func(params *getEventsByRowIDsParams) ([]*database.Event, error) { - return h.GetEventsByRowIDs(ctx, params.RowIDs) - }) + //case "get_events_by_rowids": + // return unmarshalAndCall(req.Data, func(params *getEventsByRowIDsParams) ([]*database.Event, error) { + // return h.GetEventsByRowIDs(ctx, params.RowIDs) + // }) case "get_room_state": return unmarshalAndCall(req.Data, func(params *getRoomStateParams) ([]*database.Event, error) { return h.GetRoomState(ctx, params.RoomID, params.IncludeMembers, params.FetchMembers, params.Refetch) @@ -259,9 +259,9 @@ type getEventParams struct { EventID id.EventID `json:"event_id"` } -type getEventsByRowIDsParams struct { - RowIDs []database.EventRowID `json:"row_ids"` -} +//type getEventsByRowIDsParams struct { +// RowIDs []database.EventRowID `json:"row_ids"` +//} type getRoomStateParams struct { RoomID id.RoomID `json:"room_id"` diff --git a/pkg/hicli/paginate.go b/pkg/hicli/paginate.go index e492160..6ce5d02 100644 --- a/pkg/hicli/paginate.go +++ b/pkg/hicli/paginate.go @@ -22,7 +22,7 @@ import ( var ErrPaginationAlreadyInProgress = errors.New("pagination is already in progress") -func (h *HiClient) GetEventsByRowIDs(ctx context.Context, rowIDs []database.EventRowID) ([]*database.Event, error) { +/*func (h *HiClient) GetEventsByRowIDs(ctx context.Context, rowIDs []database.EventRowID) ([]*database.Event, error) { events, err := h.DB.Event.GetByRowIDs(ctx, rowIDs...) if err != nil { return nil, err @@ -51,7 +51,7 @@ func (h *HiClient) GetEventsByRowIDs(ctx context.Context, rowIDs []database.Even // TODO slow path where events are collected and filling is done one room at a time? } return events, nil -} +}*/ func (h *HiClient) GetEvent(ctx context.Context, roomID id.RoomID, eventID id.EventID) (*database.Event, error) { if evt, err := h.DB.Event.GetByID(ctx, eventID); err != nil {