Skip to content

MessagesGetHistoryParams should respect OffsetDate #298

@ozodrukh

Description

@ozodrukh

Currently in order to fetch posts in time period we should iterate over all messages, however it should respect OffsetDate given from opts

func (c *Client) IterHistory(PeerID any, callback func(*NewMessage) error, opts ...*HistoryOption) error {
...
	req := &MessagesGetHistoryParams{
		Peer:       peerToAct,
		OffsetID:   opt.Offset,
		OffsetDate: 0,
		MaxID:      opt.MaxID,
		MinID:      opt.MinID,
	}
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions