fix: handle missing pagingInfo

This commit is contained in:
Richard Ramos 2022-12-12 11:40:28 -04:00 committed by RichΛrd
parent 87ce20d38e
commit 7443daea4c

View File

@ -256,10 +256,13 @@ func (store *WakuStore) Query(ctx context.Context, query Query, opts ...HistoryR
result := &Result{
Messages: response.Messages,
query: q,
cursor: response.PagingInfo.Cursor,
peerId: params.selectedPeer,
}
if response.PagingInfo != nil {
result.cursor = response.PagingInfo.Cursor
}
return result, nil
}