Skip to content

Commit

Permalink
backfill: don't try to use non-existent anchor message
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Nov 22, 2024
1 parent 026c749 commit 5c99708
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/connector/backfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (tc *TwitterClient) FetchMessages(ctx context.Context, params bridgev2.Fetc

reqQuery := ptr.Ptr(payload.DmRequestQuery{}.Default())
reqQuery.Count = params.Count
if params.Cursor == "" {
if params.Cursor == "" && params.AnchorMessage != nil {
reqQuery.MaxID = string(params.AnchorMessage.ID)
} else {
reqQuery.MaxID = string(params.Cursor)
Expand Down

0 comments on commit 5c99708

Please sign in to comment.