mirror of
https://github.com/status-im/go-waku.git
synced 2025-02-27 12:30:39 +00:00
fix: nil paging info
This commit is contained in:
parent
2c6d5cd7bd
commit
77ace0d772
@ -342,10 +342,16 @@ func (store *WakuStore) Next(ctx context.Context, r *Result) (*Result, error) {
|
|||||||
return nil, errors.New("invalid cursor")
|
return nil, errors.New("invalid cursor")
|
||||||
}
|
}
|
||||||
|
|
||||||
return &Result{
|
result := &Result{
|
||||||
Messages: response.Messages,
|
Messages: response.Messages,
|
||||||
cursor: response.PagingInfo.Cursor,
|
|
||||||
query: q,
|
query: q,
|
||||||
peerId: r.PeerID(),
|
peerId: r.PeerID(),
|
||||||
}, nil
|
}
|
||||||
|
|
||||||
|
if response.PagingInfo != nil {
|
||||||
|
result.cursor = response.PagingInfo.Cursor
|
||||||
|
}
|
||||||
|
|
||||||
|
return result, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user