carddav: add limit support to addressbook-query
References: https://github.com/emersion/go-webdav/issues/18
This commit is contained in:
@@ -215,6 +215,9 @@ func (c *Client) QueryAddressBook(addressBook string, query *AddressBookQuery) (
|
||||
}
|
||||
|
||||
addressbookQuery := addressbookQuery{Prop: propReq}
|
||||
if query.Limit > 0 {
|
||||
addressbookQuery.Limit = &limit{NResults: uint(query.Limit)}
|
||||
}
|
||||
|
||||
req, err := c.ic.NewXMLRequest("REPORT", addressBook, &addressbookQuery)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user